Пример #1
0
 public void testExecutePostHandlerShouldKillEnemiesAndAddMarkerItem() {
   // GIVEN
   final ImmutableMap<String, Enemy> enemiesMap =
       ImmutableMap.of("7", (Enemy) captain, "8", elvira);
   expect(resolvationData.getEnemies()).andReturn(enemiesMap);
   captain.setStamina(0);
   elvira.setStamina(0);
   expect(resolvationData.getCharacterHandler()).andReturn(characterHandler);
   expect(characterHandler.getItemHandler()).andReturn(itemHandler);
   expect(resolvationData.getCharacter()).andReturn(character);
   expect(itemHandler.addItem(character, "4001", 1)).andReturn(1);
   mockControl.replay();
   // WHEN
   underTest.executePostHandler(command, resolvationData, results, data);
   // THEN
 }
 private void fixEnemy() {
   notSelectedEnemy.setStaminaAutoDamage(0);
   notSelectedEnemy.setStaminaDamageWhileInactive(0);
   selectedEnemy.setStaminaAutoDamage(0);
   selectedEnemy.setKillableByNormal(true);
   selectedEnemy.setKillableByMagical(true);
   selectedEnemy.setKillableByBlessed(true);
   selectedEnemy.setStamina(3);
   selectedEnemy.setDamageAbsorptionEdged(0);
 }
 private void setUpEnemy() {
   selectedEnemy = new FfEnemy();
   selectedEnemy.setId("9");
   selectedEnemy.setName("Goblin");
   selectedEnemy.setSkill(8);
   notSelectedEnemy = new FfEnemy();
   notSelectedEnemy.setName("Orc");
   notSelectedEnemy.setId("33");
   notSelectedEnemy.setStamina(9);
 }