コード例 #1
0
  @Test
  public void keyREnablesShroudRevealingForPlayer() throws SlickException {
    Map map = mock(Map.class);
    when(battleField.getMap()).thenReturn(map);

    debugKeysListener.keyPressed(Input.KEY_R, ANY_CHAR);

    verify(map).revealAllShroudFor(player);
  }
コード例 #2
0
 @Test
 public void anyOtherKeyDoesNothing() {
   debugKeysListener.keyPressed(ANY_KEY, ANY_CHAR);
   verifyZeroInteractions(battleField);
 }