Skip to content

Commit

Permalink
Fix tests broken by cbdf741 et seq.
Browse files Browse the repository at this point in the history
  • Loading branch information
kingjon3377 committed Mar 30, 2024
1 parent c0bd13b commit 0663ed4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions drivers.common/src/test/java/drivers/common/cli/CLITest.java
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,8 @@ public void testInputBooleanSimpleFalse(final String arg) {
@Test
public void testInputBooleanInvalidInput() {
assertCLI(cli -> cli.inputBoolean("prompt three "), Arrays.asList("yoo-hoo", "no"),
"prompt three Please enter \"yes\", \"no\", \"true\", or \"false\",%n" +
"or the first character of any of those.%nprompt three ".formatted(), false,
("prompt three Please enter \"yes\", \"no\", \"true\", or \"false\",%n" +
"or the first character of any of those.%nprompt three ").formatted(), false,
"inputBoolean rejects other input", "inputBoolean gives message on invalid input");
}

Expand Down Expand Up @@ -249,10 +249,10 @@ public void testInputBooleanInSeriesSimpleFalse(final String arg) {
@Test
public void testInputBooleanInSeriesAll() {
assertCLI(cli -> cli.inputBooleanInSeries("prompt three "), Arrays.asList("nothing", "true"),
"prompt three Please enter \"yes\", \"no\", \"true\", or \"false\", " +
("prompt three Please enter \"yes\", \"no\", \"true\", or \"false\", " +
"the first%ncharacter of any of those, or \"all\", \"none\", \"always\", " +
"or%n\"never\" to use the same answer for all further questions.%nprompt " +
"three ".formatted(),
"three ").formatted(),
true, "inputBoolean rejects other input",
"inputBoolean gives message on invalid input");
final StringBuilder ostream = new StringBuilder();
Expand Down Expand Up @@ -342,8 +342,8 @@ public void testInputBooleanInSeriesSeparateKeys() {
"inputBooleanInSeries then honors yes-to-all");
assertEquals(false, cli.inputBooleanInSeries("prompt thirteen ", "fourthKey"),
"inputBooleanInSeries then honors no-to-all");
assertEquals("prompt ten prompt eleven prompt twelve yes%nprompt " +
"thirteen no%n".formatted(), ostream.toString(), "inputBooleanInSeries shows prompts");
assertEquals("prompt ten prompt eleven prompt twelve yes%nprompt thirteen no%n".formatted(),
ostream.toString(), "inputBooleanInSeries shows prompts");
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,13 @@ public void testDefaultResults() throws MissingTableException {
assertEquals("The primary rock type here is test_rock.",
runner.defaultResults(point, TileType.Tundra, false, Collections.emptyList(),
dimensions), "defaultResults in non-forest");
assertEquals("The primary rock type here is test_rock.%n" +
"The main kind of tree here is boreal_tree.%n".formatted(),
assertEquals(
"The primary rock type here is test_rock.%nThe main kind of tree here is boreal_tree.%n".formatted(),
runner.defaultResults(point, TileType.Steppe, false, Collections.singletonList(
new Forest("boreal_tree", false, 1)), dimensions),
"defaultResults in boreal forest");
assertEquals("The primary rock type here is test_rock.%n" +
"The main kind of tree here is temperate_tree.%n".formatted(),
assertEquals(
"The primary rock type here is test_rock.%nThe main kind of tree here is temperate_tree.%n".formatted(),
runner.defaultResults(point, TileType.Plains, false, Collections.singletonList(
new Forest("temperate_tree", false, 2)), dimensions),
"defaultResults in temperate forest");
Expand Down

0 comments on commit 0663ed4

Please sign in to comment.