-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDotComBustTest.java
More file actions
53 lines (39 loc) · 1.12 KB
/
DotComBustTest.java
File metadata and controls
53 lines (39 loc) · 1.12 KB
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
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import java.io.ByteArrayOutputStream;
import java.io.PrintStream;
import static org.junit.Assert.*;
import static org.junit.jupiter.api.Assertions.assertEquals;
import org.junit.jupiter.api.Test;
class DotComBustTest {
@Test
void testSetUpGame() {
fail("Not yet implemented");
}
@Test
void testStartPlaying() {
fail("Not yet implemented");
}
@Test
void testCheckUserGuess() {
fail("Not yet implemented");
}
@Test
void testMain() {
fail("Not yet implemented");
}
@Test
void testFinishGame() {
DotComBust test = new DotComBust();
final ByteArrayOutputStream outContent = new ByteArrayOutputStream();
System.setOut(new PrintStream(outContent));
test.finishGame();
String finalString = new String(outContent.toString());
String testString = new String("All Dot Coms are dead! Your stock is now worthless.\nIt only took you 0 guesses.\nYou got out before your options sank.\n");
assertEquals(finalString, testString);
}
}
;