From ad5e6ce0fd40985fa9d82a5fc813be02d32d3978 Mon Sep 17 00:00:00 2001 From: asvitkine Date: Thu, 13 Jul 2023 23:02:38 -0400 Subject: [PATCH] More formatting. --- .../battle/steps/BattleStepsTest.java | 88 +++++-------------- .../delegate/battle/steps/MockGameData.java | 1 - 2 files changed, 22 insertions(+), 67 deletions(-) diff --git a/game-app/game-core/src/test/java/games/strategy/triplea/delegate/battle/steps/BattleStepsTest.java b/game-app/game-core/src/test/java/games/strategy/triplea/delegate/battle/steps/BattleStepsTest.java index 5720065b121..8f2924e2f75 100644 --- a/game-app/game-core/src/test/java/games/strategy/triplea/delegate/battle/steps/BattleStepsTest.java +++ b/game-app/game-core/src/test/java/games/strategy/triplea/delegate/battle/steps/BattleStepsTest.java @@ -337,9 +337,7 @@ void basicLandBattle() { givenBattleSteps( givenBattleStateBuilder() .gameData( - givenGameDataWithLenientProperties() - .withAlliedAirIndependent(true) - .build()) + givenGameDataWithLenientProperties().withAlliedAirIndependent(true).build()) .attacker(attacker) .defender(defender) .attackingUnits(List.of(unit1)) @@ -362,9 +360,7 @@ void bombardOnFirstRun() { givenBattleSteps( givenBattleStateBuilder() .gameData( - givenGameDataWithLenientProperties() - .withAlliedAirIndependent(true) - .build()) + givenGameDataWithLenientProperties().withAlliedAirIndependent(true).build()) .attacker(attacker) .defender(defender) .attackingUnits(List.of(unit1)) @@ -391,9 +387,7 @@ void bombardOnSubsequentRun() { givenBattleSteps( givenBattleStateBuilder() .gameData( - givenGameDataWithLenientProperties() - .withAlliedAirIndependent(true) - .build()) + givenGameDataWithLenientProperties().withAlliedAirIndependent(true).build()) .attacker(attacker) .defender(defender) .battleRound(2) @@ -415,9 +409,7 @@ void impossibleSeaBattleWithBombarding() { givenBattleSteps( givenBattleStateBuilder() .gameData( - givenGameDataWithLenientProperties() - .withAlliedAirIndependent(true) - .build()) + givenGameDataWithLenientProperties().withAlliedAirIndependent(true).build()) .battleRound(1) .attacker(attacker) .defender(defender) @@ -473,9 +465,7 @@ void noAirTransportTech() { givenBattleSteps( givenBattleStateBuilder() .gameData( - givenGameDataWithLenientProperties() - .withAlliedAirIndependent(true) - .build()) + givenGameDataWithLenientProperties().withAlliedAirIndependent(true).build()) .battleRound(1) .attacker(attacker) .defender(defender) @@ -497,9 +487,7 @@ void paratroopersSubsequentRun() { givenBattleSteps( givenBattleStateBuilder() .gameData( - givenGameDataWithLenientProperties() - .withAlliedAirIndependent(true) - .build()) + givenGameDataWithLenientProperties().withAlliedAirIndependent(true).build()) .attacker(attacker) .defender(defender) .battleRound(2) @@ -551,9 +539,7 @@ void impossibleSeaBattleWithParatroopers() { givenBattleSteps( givenBattleStateBuilder() .gameData( - givenGameDataWithLenientProperties() - .withAlliedAirIndependent(true) - .build()) + givenGameDataWithLenientProperties().withAlliedAirIndependent(true).build()) .battleRound(1) .attacker(attacker) .defender(defender) @@ -741,9 +727,7 @@ void defendingSubsRetreatIfCanNotRetreatBeforeBattle() { givenBattleSteps( givenBattleStateBuilder() .gameData( - givenGameDataWithLenientProperties() - .withAlliedAirIndependent(true) - .build()) + givenGameDataWithLenientProperties().withAlliedAirIndependent(true).build()) .attacker(attacker) .defender(defender) .attackingUnits(List.of(unit1)) @@ -826,9 +810,7 @@ void unescortedAttackingTransportsAreNotRemovedWhenCasualtiesAreNotRestricted() givenBattleSteps( givenBattleStateBuilder() .gameData( - givenGameDataWithLenientProperties() - .withAlliedAirIndependent(true) - .build()) + givenGameDataWithLenientProperties().withAlliedAirIndependent(true).build()) .attacker(attacker) .defender(defender) .attackingUnits(List.of(unit1)) @@ -877,9 +859,7 @@ void unescortedDefendingTransportsAreNotRemovedWhenCasualtiesAreNotRestricted() givenBattleSteps( givenBattleStateBuilder() .gameData( - givenGameDataWithLenientProperties() - .withAlliedAirIndependent(true) - .build()) + givenGameDataWithLenientProperties().withAlliedAirIndependent(true).build()) .attacker(attacker) .defender(defender) .attackingUnits(List.of(unit1)) @@ -903,9 +883,7 @@ void attackingFirstStrikeBasic() { givenBattleSteps( givenBattleStateBuilder() .gameData( - givenGameDataWithLenientProperties() - .withAlliedAirIndependent(true) - .build()) + givenGameDataWithLenientProperties().withAlliedAirIndependent(true).build()) .attacker(attacker) .defender(defender) .attackingUnits(List.of(unit1)) @@ -933,9 +911,7 @@ void attackingFirstStrikeWithDestroyers() { givenBattleSteps( givenBattleStateBuilder() .gameData( - givenGameDataWithLenientProperties() - .withAlliedAirIndependent(true) - .build()) + givenGameDataWithLenientProperties().withAlliedAirIndependent(true).build()) .attacker(attacker) .defender(defender) .attackingUnits(List.of(unit1)) @@ -964,9 +940,7 @@ void defendingFirstStrikeBasic() { givenBattleSteps( givenBattleStateBuilder() .gameData( - givenGameDataWithLenientProperties() - .withAlliedAirIndependent(true) - .build()) + givenGameDataWithLenientProperties().withAlliedAirIndependent(true).build()) .attacker(attacker) .defender(defender) .attackingUnits(List.of(unit1)) @@ -1087,9 +1061,7 @@ void attackingDefendingFirstStrikeBasic() { givenBattleSteps( givenBattleStateBuilder() .gameData( - givenGameDataWithLenientProperties() - .withAlliedAirIndependent(true) - .build()) + givenGameDataWithLenientProperties().withAlliedAirIndependent(true).build()) .attacker(attacker) .defender(defender) .attackingUnits(List.of(unit1)) @@ -1601,9 +1573,7 @@ void attackingFirstStrikeWithdrawIfAble() { givenBattleSteps( givenBattleStateBuilder() .gameData( - givenGameDataWithLenientProperties() - .withAlliedAirIndependent(true) - .build()) + givenGameDataWithLenientProperties().withAlliedAirIndependent(true).build()) .attacker(attacker) .defender(defender) .attackingUnits(List.of(unit1)) @@ -1637,9 +1607,7 @@ void attackingFirstStrikeNoWithdrawIfEmptyTerritories() { givenBattleSteps( givenBattleStateBuilder() .gameData( - givenGameDataWithLenientProperties() - .withAlliedAirIndependent(true) - .build()) + givenGameDataWithLenientProperties().withAlliedAirIndependent(true).build()) .attacker(attacker) .defender(defender) .attackingUnits(List.of(unit1)) @@ -1669,9 +1637,7 @@ void attackingFirstStrikeNoWithdrawIfDestroyers() { givenBattleSteps( givenBattleStateBuilder() .gameData( - givenGameDataWithLenientProperties() - .withAlliedAirIndependent(true) - .build()) + givenGameDataWithLenientProperties().withAlliedAirIndependent(true).build()) .attacker(attacker) .defender(defender) .attackingUnits(List.of(unit1)) @@ -1702,9 +1668,7 @@ void attackingFirstStrikeWithdrawIfNonRestrictedDefenselessTransports() { givenBattleSteps( givenBattleStateBuilder() .gameData( - givenGameDataWithLenientProperties() - .withAlliedAirIndependent(true) - .build()) + givenGameDataWithLenientProperties().withAlliedAirIndependent(true).build()) .attacker(attacker) .defender(defender) .attackingUnits(List.of(unit1)) @@ -1774,9 +1738,7 @@ void defendingFirstStrikeNoWithdrawIfEmptyTerritories() { givenBattleSteps( givenBattleStateBuilder() .gameData( - givenGameDataWithLenientProperties() - .withAlliedAirIndependent(true) - .build()) + givenGameDataWithLenientProperties().withAlliedAirIndependent(true).build()) .attacker(attacker) .defender(defender) .attackingUnits(List.of(unit1)) @@ -1805,9 +1767,7 @@ void defendingFirstStrikeNoWithdrawIfDestroyers() { givenBattleSteps( givenBattleStateBuilder() .gameData( - givenGameDataWithLenientProperties() - .withAlliedAirIndependent(true) - .build()) + givenGameDataWithLenientProperties().withAlliedAirIndependent(true).build()) .attacker(attacker) .defender(defender) .attackingUnits(List.of(unit1)) @@ -1834,9 +1794,7 @@ void attackingAirUnitsAtSeaCanWithdraw() { givenBattleSteps( givenBattleStateBuilder() .gameData( - givenGameDataWithLenientProperties() - .withAlliedAirIndependent(true) - .build()) + givenGameDataWithLenientProperties().withAlliedAirIndependent(true).build()) .attacker(attacker) .defender(defender) .attackingUnits(List.of(unit1)) @@ -1919,9 +1877,7 @@ void partialAmphibiousAttackCanNotWithdrawIfNotAllowed() { givenBattleSteps( givenBattleStateBuilder() .gameData( - givenGameDataWithLenientProperties() - .withAlliedAirIndependent(true) - .build()) + givenGameDataWithLenientProperties().withAlliedAirIndependent(true).build()) .attacker(attacker) .defender(defender) .attackingUnits(List.of(unit1, unit3)) diff --git a/game-app/game-core/src/test/java/games/strategy/triplea/delegate/battle/steps/MockGameData.java b/game-app/game-core/src/test/java/games/strategy/triplea/delegate/battle/steps/MockGameData.java index a7e114ab0bc..20c80f3e271 100644 --- a/game-app/game-core/src/test/java/games/strategy/triplea/delegate/battle/steps/MockGameData.java +++ b/game-app/game-core/src/test/java/games/strategy/triplea/delegate/battle/steps/MockGameData.java @@ -16,7 +16,6 @@ import static games.strategy.triplea.Constants.SUB_RETREAT_BEFORE_BATTLE; import static games.strategy.triplea.Constants.TRANSPORT_CASUALTIES_RESTRICTED; import static games.strategy.triplea.Constants.WW2V2; -import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyBoolean; import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.Mockito.lenient;