blob: 5a9aca4387428c67af0708abc69c3e4a21994602 (
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
package eu.equalparts.cardbase.cli;
import static org.junit.Assert.*;
import java.io.File;
import java.io.IOException;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.PrintStream;
import java.io.StringReader;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import eu.equalparts.cardbase.cli.CardbaseCLI;
public class CardbaseCLITest {
private CardbaseCLI uut;
private static StringBuilder output = new StringBuilder();
@BeforeClass
public static void setUpBeforeClass() throws Exception {
System.setOut(new PrintStream(new OutputStream() {
@Override
public void write(int b) throws IOException {
output.append((char) b);
}
}, true));
}
@AfterClass
public static void tearDownAfterClass() throws Exception {
}
@Before
public void setUp() throws Exception {
}
@After
public void tearDown() throws Exception {
}
/***********************************************************************************
* Constructor tests, happy path
***********************************************************************************/
@Test
public void initialiseWithCardbaseFile() throws Exception {
uut = new CardbaseCLI(getClass().getResource("testbase.cb").getPath());
}
}
|