Skip to content

Commit

Permalink
Remove now unnecessary stubbing.
Browse files Browse the repository at this point in the history
  • Loading branch information
asvitkine committed Aug 27, 2023
1 parent 8d0ced0 commit 7f3c94d
Showing 1 changed file with 0 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,6 @@ void retreatHappensWhenNotSubmersibleButHasRetreatTerritories() {
final GameData gameData = givenGameData().build();

final Unit unit = givenRealUnitCanEvade(gameData, defender);
final UnitAttachment unitAttachment =
(UnitAttachment) unit.getType().getAttachment(UNIT_ATTACHMENT_NAME);
when(unitAttachment.getTransportCapacity()).thenReturn(-1);
final Collection<Unit> retreatingUnits = List.of(unit);

final Territory retreatTerritory = mock(Territory.class);
Expand Down Expand Up @@ -265,7 +262,6 @@ void retreatHappensWhenNotSubmersibleButHasRetreatTerritories() {

@Test
void retreatHappensWhenDefendingIsSubmersibleAndHasRetreatTerritories() {

final Territory retreatTerritory = mock(Territory.class);
when(retreatTerritory.isWater()).thenReturn(true);
final UnitCollection retreatTerritoryCollection = mock(UnitCollection.class);
Expand All @@ -280,9 +276,6 @@ void retreatHappensWhenDefendingIsSubmersibleAndHasRetreatTerritories() {
.build();

final Unit unit = givenRealUnitCanEvade(gameData, defender);
final UnitAttachment unitAttachment =
(UnitAttachment) unit.getType().getAttachment(UNIT_ATTACHMENT_NAME);
when(unitAttachment.getTransportCapacity()).thenReturn(-1);
final Collection<Unit> retreatingUnits = List.of(unit);

final BattleState battleState =
Expand Down

0 comments on commit 7f3c94d

Please sign in to comment.