blob: 678194b8ab3356af4a0cc3f2905ffbf99f02a9b2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
package bjc.dicelang.neodice;
import static org.junit.Assert.*;
import java.io.*;
import org.junit.*;
@SuppressWarnings("javadoc")
public class DieBoxCLITest {
private DieBoxCLI diebox;
private OutputStream dieBoxInput;
private InputStream dieBoxOutput;
@Before
public void setUp() throws Exception {
PipedInputStream pipeInput = new PipedInputStream();
dieBoxInput = new PipedOutputStream(pipeInput);
PipedOutputStream pipeOutput = new PipedOutputStream();
dieBoxOutput = new PipedInputStream(pipeOutput);
diebox = new DieBoxCLI(pipeInput, pipeOutput);
}
@After
public void tearDown() throws Exception {
dieBoxInput.close();
dieBoxOutput.close();
}
// @TODO write some tests
}
|