Skip to content

Commit

Permalink
More formatting issues
Browse files Browse the repository at this point in the history
Formatting, and removal of @test for concatWithColon
  • Loading branch information
WCSumpton committed Sep 18, 2023
1 parent 08acd06 commit 71b222b
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ void testCheckHaveResources() throws Exception {
final int testItalianPU = italianPuAmount;
final int testItalianResources = italianOreAmount + italianFuelAmount + italianPuAmount;
final int testPUs = testItalianPU + germanPuAmount;
final int testResources = testItalianResources + germanPuAmount + germanFuelAmount + germanOreAmount;
final int testResources =
testItalianResources + germanPuAmount + germanFuelAmount + germanOreAmount;

/* testing with 1 player */
final List<GamePlayer> players = List.of(italians);
Expand All @@ -116,18 +117,16 @@ void testCheckHaveResources() throws Exception {
assertFalse(attachment.checkHaveResources(players1));
attachment.setHaveResources(concatWithColon(String.valueOf(testPUs), sumString, PUS));
assertTrue(attachment.checkHaveResources(players1));
attachment.setHaveResources(
concatWithColon(String.valueOf(testResources), sumString, PUS));
attachment.setHaveResources(concatWithColon(String.valueOf(testResources), sumString, PUS));
assertFalse(attachment.checkHaveResources(players1));
attachment.setHaveResources(
concatWithColon(String.valueOf(testResources), sumString, PUS, fuel));
assertFalse(attachment.checkHaveResources(players1));
attachment.setHaveResources(
concatWithColon(String.valueOf(testResources), sumString, PUS, fuel, ore));
assertTrue(attachment.checkHaveResources(players1));

}
@Test

private String concatWithColon(final String... args) {
return String.join(":", args);
}
Expand Down

0 comments on commit 71b222b

Please sign in to comment.