mirror of
https://github.com/filoghost/HolographicDisplays.git
synced 2025-01-20 06:41:20 +01:00
Additional test
This commit is contained in:
parent
e67bfcd750
commit
0cb6fed921
@ -28,6 +28,16 @@ class StringWithPlaceholdersTest {
|
|||||||
assertThat(s.containsPlaceholders()).isEqualTo(expectedContainsPlaceholders);
|
assertThat(s.containsPlaceholders()).isEqualTo(expectedContainsPlaceholders);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ParameterizedTest(name = "[{index}] {0} -> {1}")
|
||||||
|
@MethodSource("replacementsTestArguments")
|
||||||
|
void partialReplacements(String input, String expectedOutput) {
|
||||||
|
boolean expectedContainsPlaceholders = expectedOutput.contains("#");
|
||||||
|
StringWithPlaceholders s = new StringWithPlaceholders(input);
|
||||||
|
|
||||||
|
assertThat(s.partiallyReplacePlaceholders(occurrence -> "#").toString()).isEqualTo(expectedOutput);
|
||||||
|
assertThat(s.containsPlaceholders()).isEqualTo(expectedContainsPlaceholders);
|
||||||
|
}
|
||||||
|
|
||||||
static Stream<Arguments> replacementsTestArguments() {
|
static Stream<Arguments> replacementsTestArguments() {
|
||||||
return Stream.of(
|
return Stream.of(
|
||||||
Arguments.of("", ""),
|
Arguments.of("", ""),
|
||||||
|
Loading…
Reference in New Issue
Block a user