Esempio n. 1
0
 @Test
 public void engageCommandAtNoEngageModeShouldReturnNothingToFight() {
   ApplicationContext ac = new ApplicationContext();
   gameController =
       new GameController(
           ac.systemLocator,
           ac.commandFactory,
           new Game(
               ac.world, ac.history, GameState.Explore, Level.Level_1, new CustomCharacter()));
   gameController.getGame().setState(GameState.Explore);
   assertThat(
       gameController.processInput(CommandType.EngageInFight.getKey()).getMessages(),
       contains(ResponseMessage.ShouldBeExploring, ResponseMessage.Explore));
 }
Esempio n. 2
0
 @Test
 public void fightCommandAtEngageStateShouldReturnDiscussionTopic() {
   assertThat(
       gameController.processInput(CommandType.EngageInFight.getKey()).getMessages(),
       hasItem(ResponseMessage.EngageStart));
 }