Skip to content

Instantly share code, notes, and snippets.

@samuelteixeiras
Created September 23, 2021 14:06
Show Gist options
  • Save samuelteixeiras/a5e241897d4560e469a25048401d5de7 to your computer and use it in GitHub Desktop.
Save samuelteixeiras/a5e241897d4560e469a25048401d5de7 to your computer and use it in GitHub Desktop.
WeekOneExercisesTest4
private static final String OSWALD_ALONE = "Oswald acted alone";
private static final String FAVORITE_MOVIE = "matrix";
private static final String MOVIE_RATE_VALUE = "5";
private static final String MOVIE_RATE = "Move rating is: " + MOVIE_RATE_VALUE;
@Test
public void itTestFilmRating() {
InputStream in = new ByteArrayInputStream(MOVIE_RATE_VALUE.getBytes());
System.setIn(in);
WeekOneExercises.main(null);
Assert.assertTrue(outContent.toString().contains(MOVIE_RATE));
Assert.assertTrue(outContent.toString().contains(OSWALD_ALONE));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment