Armin Schrenk 1 jaar geleden
bovenliggende
commit
8c3ede0d2a
1 gewijzigde bestanden met toevoegingen van 7 en 6 verwijderingen
  1. 7 6
      src/test/java/org/cryptomator/common/SubstitutingPropertiesTest.java

+ 7 - 6
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);
 		}