mirror of
https://github.com/cryptomator/cryptomator.git
synced 2026-05-20 11:41:26 +00:00
clean up
This commit is contained in:
@@ -21,13 +21,14 @@ public class SubstitutingPropertiesTest {
|
||||
|
||||
@ParameterizedTest
|
||||
@DisplayName("Test template replacement")
|
||||
@CsvSource(value = {"unknown.@{testToken}.test, unknown.@{testToken}.test", //
|
||||
"@{only*words*digits*under_score\\},@{only*words*digits*under_score\\}", //
|
||||
"C:\\Users\\@{appdir}\\dir, C:\\Users\\foobar\\dir", //
|
||||
"@{@{appdir}},@{foobar}", //
|
||||
"Longer @{appdir} text with @{appdir}., Longer foobar text with foobar."})
|
||||
@CsvSource(textBlock = """
|
||||
unknown.@{testToken}.test, unknown.@{testToken}.test
|
||||
@{only*words*digits*under_score},@{only*words*digits*under_score}
|
||||
C:\\Users\\@{appdir}\\dir, C:\\Users\\foobar\\dir
|
||||
@{@{appdir}},@{foobar}
|
||||
Replacing several @{appdir} with @{appdir}., Replacing several foobar with foobar.""")
|
||||
public void test(String propertyValue, String expected) {
|
||||
SubstitutingProperties inTest = new SubstitutingProperties(new Properties(), Map.of("APPDIR", "foobar"));
|
||||
SubstitutingProperties inTest = new SubstitutingProperties(Mockito.mock(Properties.class), Map.of("APPDIR", "foobar"));
|
||||
var result = inTest.process(propertyValue);
|
||||
Assertions.assertEquals(result, expected);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user