public void testShouldExecutePostHandlerWhenEnemiesDoesNotContainSevenShouldReturnFalse() { // GIVEN expect(command.getEnemies()).andReturn(Arrays.asList("3", "75", "44")); mockControl.replay(); // WHEN final boolean returned = underTest.shouldExecutePostHandler(command, resolvationData, results, data); // THEN Assert.assertFalse(returned); }
public void testShouldExecutePostHandlerWhenCaptainAttackStrengthTooLowShouldReturnFalse() { // GIVEN expect(command.getEnemies()).andReturn(Arrays.asList("7", "8")); final ImmutableMap<String, Integer> attackStrengths = ImmutableMap.of("7", 14, "8", 13); expect(command.getAttackStrengths()).andReturn(attackStrengths).times(2); mockControl.replay(); // WHEN final boolean returned = underTest.shouldExecutePostHandler(command, resolvationData, results, data); // THEN Assert.assertFalse(returned); }
public void testShouldExecutePostHandlerWhenLostAgainstHighCaptainAttackStrengthShouldReturnTrue() { // GIVEN results = new FightRoundResult[] {FightRoundResult.LOSE, FightRoundResult.TIE}; expect(command.getEnemies()).andReturn(Arrays.asList("7", "8")); final ImmutableMap<String, Integer> attackStrengths = ImmutableMap.of("7", 18, "8", 13); expect(command.getAttackStrengths()).andReturn(attackStrengths).times(2); mockControl.replay(); // WHEN final boolean returned = underTest.shouldExecutePostHandler(command, resolvationData, results, data); // THEN Assert.assertTrue(returned); }