From 30aeaf1616d95fb1de04cbe918be9adc07369d15 Mon Sep 17 00:00:00 2001 From: Christopher Watford Date: Wed, 30 Dec 2020 10:00:10 -0500 Subject: [PATCH] Resolve PR comments --- .../ContractMarketAtBGenerationTests.java | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/MekHQ/unittests/mekhq/campaign/market/ContractMarketAtBGenerationTests.java b/MekHQ/unittests/mekhq/campaign/market/ContractMarketAtBGenerationTests.java index e42ce6a182..96b8868aac 100644 --- a/MekHQ/unittests/mekhq/campaign/market/ContractMarketAtBGenerationTests.java +++ b/MekHQ/unittests/mekhq/campaign/market/ContractMarketAtBGenerationTests.java @@ -86,7 +86,7 @@ public void addMercWithoutRetainerAtBContractSucceeds() { when(campaign.getFactionCode()).thenReturn("MERC"); when(campaign.getRetainerEmployerCode()).thenReturn(null); when(campaign.getUnitRatingMod()).thenReturn(unitRating); - when(campaign.getLocalDate()).thenReturn(LocalDate.of(gameYear, 1, 1)); + when(campaign.getLocalDate()).thenReturn(LocalDate.ofYearDay(gameYear, 1)); when(campaign.getGameYear()).thenReturn(gameYear); CampaignOptions campaignOptions = mock(CampaignOptions.class); @@ -182,7 +182,7 @@ public void addMercWithoutRetainerMinorPowerAtBContractSucceeds() { when(campaign.getFactionCode()).thenReturn("MERC"); when(campaign.getRetainerEmployerCode()).thenReturn(null); when(campaign.getUnitRatingMod()).thenReturn(unitRating); - when(campaign.getLocalDate()).thenReturn(LocalDate.of(gameYear, 1, 1)); + when(campaign.getLocalDate()).thenReturn(LocalDate.ofYearDay(gameYear, 1)); when(campaign.getGameYear()).thenReturn(gameYear); CampaignOptions campaignOptions = mock(CampaignOptions.class); @@ -278,7 +278,7 @@ public void addMercWithoutRetainerEmployerNeutralAtBContractSucceeds() { when(campaign.getFactionCode()).thenReturn("MERC"); when(campaign.getRetainerEmployerCode()).thenReturn(null); when(campaign.getUnitRatingMod()).thenReturn(unitRating); - when(campaign.getLocalDate()).thenReturn(LocalDate.of(gameYear, 1, 1)); + when(campaign.getLocalDate()).thenReturn(LocalDate.ofYearDay(gameYear, 1)); when(campaign.getGameYear()).thenReturn(gameYear); CampaignOptions campaignOptions = mock(CampaignOptions.class); @@ -374,7 +374,7 @@ public void addMercWithoutRetainerEmployerNeutralAtWarAtBContractSucceeds() { when(campaign.getFactionCode()).thenReturn("MERC"); when(campaign.getRetainerEmployerCode()).thenReturn(null); when(campaign.getUnitRatingMod()).thenReturn(unitRating); - when(campaign.getLocalDate()).thenReturn(LocalDate.of(gameYear, 1, 1)); + when(campaign.getLocalDate()).thenReturn(LocalDate.ofYearDay(gameYear, 1)); when(campaign.getGameYear()).thenReturn(gameYear); CampaignOptions campaignOptions = mock(CampaignOptions.class); @@ -471,7 +471,7 @@ public void mercEmployerRetries() { when(campaign.getFactionCode()).thenReturn("MERC"); when(campaign.getRetainerEmployerCode()).thenReturn(null); when(campaign.getUnitRatingMod()).thenReturn(unitRating); - when(campaign.getLocalDate()).thenReturn(LocalDate.of(gameYear, 1, 1)); + when(campaign.getLocalDate()).thenReturn(LocalDate.ofYearDay(gameYear, 1)); when(campaign.getGameYear()).thenReturn(gameYear); CampaignOptions campaignOptions = mock(CampaignOptions.class); @@ -569,7 +569,7 @@ public void mercEmployerRetriesFail() { when(campaign.getFactionCode()).thenReturn("MERC"); when(campaign.getRetainerEmployerCode()).thenReturn(null); when(campaign.getUnitRatingMod()).thenReturn(unitRating); - when(campaign.getLocalDate()).thenReturn(LocalDate.of(gameYear, 1, 1)); + when(campaign.getLocalDate()).thenReturn(LocalDate.ofYearDay(gameYear, 1)); when(campaign.getGameYear()).thenReturn(gameYear); Factions factions = mock(Factions.class); @@ -592,7 +592,7 @@ public void mercMissiongTargetRetries() { when(campaign.getFactionCode()).thenReturn("MERC"); when(campaign.getRetainerEmployerCode()).thenReturn(null); when(campaign.getUnitRatingMod()).thenReturn(unitRating); - when(campaign.getLocalDate()).thenReturn(LocalDate.of(gameYear, 1, 1)); + when(campaign.getLocalDate()).thenReturn(LocalDate.ofYearDay(gameYear, 1)); when(campaign.getGameYear()).thenReturn(gameYear); CampaignOptions campaignOptions = mock(CampaignOptions.class); @@ -689,7 +689,7 @@ public void mercMissionTargetRetriesFail() { when(campaign.getFactionCode()).thenReturn("MERC"); when(campaign.getRetainerEmployerCode()).thenReturn(null); when(campaign.getUnitRatingMod()).thenReturn(unitRating); - when(campaign.getLocalDate()).thenReturn(LocalDate.of(gameYear, 1, 1)); + when(campaign.getLocalDate()).thenReturn(LocalDate.ofYearDay(gameYear, 1)); when(campaign.getGameYear()).thenReturn(gameYear); CampaignOptions campaignOptions = mock(CampaignOptions.class); @@ -780,7 +780,7 @@ public void mercJumpPathRetries() { when(campaign.getFactionCode()).thenReturn("MERC"); when(campaign.getRetainerEmployerCode()).thenReturn(null); when(campaign.getUnitRatingMod()).thenReturn(unitRating); - when(campaign.getLocalDate()).thenReturn(LocalDate.of(gameYear, 1, 1)); + when(campaign.getLocalDate()).thenReturn(LocalDate.ofYearDay(gameYear, 1)); when(campaign.getGameYear()).thenReturn(gameYear); CampaignOptions campaignOptions = mock(CampaignOptions.class); @@ -877,7 +877,7 @@ public void mercJumpPathFails() { when(campaign.getFactionCode()).thenReturn("MERC"); when(campaign.getRetainerEmployerCode()).thenReturn(null); when(campaign.getUnitRatingMod()).thenReturn(unitRating); - when(campaign.getLocalDate()).thenReturn(LocalDate.of(gameYear, 1, 1)); + when(campaign.getLocalDate()).thenReturn(LocalDate.ofYearDay(gameYear, 1)); when(campaign.getGameYear()).thenReturn(gameYear); CampaignOptions campaignOptions = mock(CampaignOptions.class); @@ -971,7 +971,7 @@ public void addMercWithRetainerAtBContractSucceeds() { when(campaign.getFactionCode()).thenReturn("MERC"); when(campaign.getRetainerEmployerCode()).thenReturn(employer); when(campaign.getUnitRatingMod()).thenReturn(unitRating); - when(campaign.getLocalDate()).thenReturn(LocalDate.of(gameYear, 1, 1)); + when(campaign.getLocalDate()).thenReturn(LocalDate.ofYearDay(gameYear, 1)); when(campaign.getGameYear()).thenReturn(gameYear); CampaignOptions campaignOptions = mock(CampaignOptions.class); @@ -1067,7 +1067,7 @@ public void addMercWithRetainerMinorPowerAtBContractSucceeds() { when(campaign.getFactionCode()).thenReturn("MERC"); when(campaign.getRetainerEmployerCode()).thenReturn(employer); when(campaign.getUnitRatingMod()).thenReturn(unitRating); - when(campaign.getLocalDate()).thenReturn(LocalDate.of(gameYear, 1, 1)); + when(campaign.getLocalDate()).thenReturn(LocalDate.ofYearDay(gameYear, 1)); when(campaign.getGameYear()).thenReturn(gameYear); CampaignOptions campaignOptions = mock(CampaignOptions.class); @@ -1163,7 +1163,7 @@ public void addMercWithRetainerEmployerNeutralAtBContractSucceeds() { when(campaign.getFactionCode()).thenReturn("MERC"); when(campaign.getRetainerEmployerCode()).thenReturn(employer); when(campaign.getUnitRatingMod()).thenReturn(unitRating); - when(campaign.getLocalDate()).thenReturn(LocalDate.of(gameYear, 1, 1)); + when(campaign.getLocalDate()).thenReturn(LocalDate.ofYearDay(gameYear, 1)); when(campaign.getGameYear()).thenReturn(gameYear); CampaignOptions campaignOptions = mock(CampaignOptions.class); @@ -1259,7 +1259,7 @@ public void addMercWithRetainerEmployerNeutralAtWarAtBContractSucceeds() { when(campaign.getFactionCode()).thenReturn("MERC"); when(campaign.getRetainerEmployerCode()).thenReturn(employer); when(campaign.getUnitRatingMod()).thenReturn(unitRating); - when(campaign.getLocalDate()).thenReturn(LocalDate.of(gameYear, 1, 1)); + when(campaign.getLocalDate()).thenReturn(LocalDate.ofYearDay(gameYear, 1)); when(campaign.getGameYear()).thenReturn(gameYear); CampaignOptions campaignOptions = mock(CampaignOptions.class); @@ -1355,7 +1355,7 @@ public void nonMercAtBContractSucceeds() { when(campaign.getFactionCode()).thenReturn(employer); when(campaign.getRetainerEmployerCode()).thenReturn(null); when(campaign.getUnitRatingMod()).thenReturn(unitRating); - when(campaign.getLocalDate()).thenReturn(LocalDate.of(gameYear, 1, 1)); + when(campaign.getLocalDate()).thenReturn(LocalDate.ofYearDay(gameYear, 1)); when(campaign.getGameYear()).thenReturn(gameYear); CampaignOptions campaignOptions = mock(CampaignOptions.class); @@ -1451,7 +1451,7 @@ public void nonMercMinorPowerAtBContractSucceeds() { when(campaign.getFactionCode()).thenReturn(employer); when(campaign.getRetainerEmployerCode()).thenReturn(null); when(campaign.getUnitRatingMod()).thenReturn(unitRating); - when(campaign.getLocalDate()).thenReturn(LocalDate.of(gameYear, 1, 1)); + when(campaign.getLocalDate()).thenReturn(LocalDate.ofYearDay(gameYear, 1)); when(campaign.getGameYear()).thenReturn(gameYear); CampaignOptions campaignOptions = mock(CampaignOptions.class); @@ -1547,7 +1547,7 @@ public void nonMercNeutralAtBContractSucceeds() { when(campaign.getFactionCode()).thenReturn(employer); when(campaign.getRetainerEmployerCode()).thenReturn(null); when(campaign.getUnitRatingMod()).thenReturn(unitRating); - when(campaign.getLocalDate()).thenReturn(LocalDate.of(gameYear, 1, 1)); + when(campaign.getLocalDate()).thenReturn(LocalDate.ofYearDay(gameYear, 1)); when(campaign.getGameYear()).thenReturn(gameYear); CampaignOptions campaignOptions = mock(CampaignOptions.class); @@ -1643,7 +1643,7 @@ public void nonMercNeutralAtWarAtBContractSucceeds() { when(campaign.getFactionCode()).thenReturn(employer); when(campaign.getRetainerEmployerCode()).thenReturn(null); when(campaign.getUnitRatingMod()).thenReturn(unitRating); - when(campaign.getLocalDate()).thenReturn(LocalDate.of(gameYear, 1, 1)); + when(campaign.getLocalDate()).thenReturn(LocalDate.ofYearDay(gameYear, 1)); when(campaign.getGameYear()).thenReturn(gameYear); CampaignOptions campaignOptions = mock(CampaignOptions.class);