File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
mad-lib/src/test/java/com/craftsmanshipinsoftware/madlib Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff 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\n walk\n blue\n quickly" .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
You can’t perform that action at this time.
0 commit comments