From 8c3ede0d2abe0ad0ccf610477d4de86e77136889 Mon Sep 17 00:00:00 2001 From: Armin Schrenk Date: Fri, 30 Jun 2023 11:20:28 +0200 Subject: [PATCH] clean up --- .../common/SubstitutingPropertiesTest.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/test/java/org/cryptomator/common/SubstitutingPropertiesTest.java b/src/test/java/org/cryptomator/common/SubstitutingPropertiesTest.java index ab53f8d86..723e01bcf 100644 --- a/src/test/java/org/cryptomator/common/SubstitutingPropertiesTest.java +++ b/src/test/java/org/cryptomator/common/SubstitutingPropertiesTest.java @@ -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); }