예제 #1
0
 @Test
 public void replaysUntilNo() {
   uiSpy.setMenuOptions("1", "3", "1", "3");
   uiSpy.setUserInputs(1, 4, 2, 5, 3, 1, 2, 3, 4, 5, 7, 6, 9, 8);
   uiSpy.setReplayAnswers(true, false);
   gameSetup.playGame(menu, playerCreator);
   assertTrue(uiSpy.replayWasCalled());
 }
예제 #2
0
 @Test
 public void printsWelcomeMessage() {
   uiSpy.setMenuOptions("1", "3");
   uiSpy.setUserInputs(1, 4, 2, 5, 3);
   uiSpy.setReplayAnswers(false);
   gameSetup.playGame(menu, playerCreator);
   assertTrue(uiSpy.printWelcomeMessageWasCalled());
 }