Skip to content

Commit 5d6d0df

Browse files
committed
Polish MadLibTest
1 parent 677afec commit 5d6d0df

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

mad-lib/src/test/java/com/craftsmanshipinsoftware/madlib/MadLibTest.java

+4
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,19 @@ class MadLibTest {
1616
void printStory_GivenInputIsMissing_ShouldAskForMissingInput(String input) {
1717
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
1818
MadLib madLib = new MadLib(new ByteArrayInputStream(input.getBytes()), new PrintStream(outputStream));
19+
1920
madLib.printStory();
21+
2022
assertThat(outputStream).hasToString("Please enter something as input!" + System.lineSeparator());
2123
}
2224

2325
@Test
2426
void printStory_GivenAllNeededInput_ShouldPrintStory() {
2527
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
2628
MadLib madLib = new MadLib(new ByteArrayInputStream("dog\nwalk\nblue\nquickly".getBytes()), new PrintStream(outputStream));
29+
2730
madLib.printStory();
31+
2832
assertThat(outputStream).hasToString("Do you walk your blue dog quickly? That's hilarious!" + System.lineSeparator());
2933
}
3034

0 commit comments

Comments
 (0)