Ejemplo 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));
 }
Ejemplo n.º 2
0
 @Test
 public void fightCommandAtEngageStateShouldReturnDiscussionTopic() {
   assertThat(
       gameController.processInput(CommandType.EngageInFight.getKey()).getMessages(),
       hasItem(ResponseMessage.EngageStart));
 }