@Test public void testPathsWithoutEnvironmentVariables() throws Exception { final EnvironmentVariableReplacer replacer = new EnvironmentVariableReplacer(); SoftAssertions.assertSoftly(softly -> { softly.assertThat(replacer.hasUnknownEnvironmentVariables("a/b/c/file.txt")).isFalse(); softly.assertThat(replacer.hasUnknownEnvironmentVariables("%/b/c/file.txt")).isFalse(); softly.assertThat(replacer.hasUnknownEnvironmentVariables("%{a/b/c/file.txt")).isFalse(); softly.assertThat(replacer.hasUnknownEnvironmentVariables("%a}/b/c/file.txt")).isFalse(); }); }
public boolean hasUnknownEnvironmentVariables(final String path) { return ENV_VAR_PATTERN.matcher(path).find(); }
EnvironmentVariableReplacer { public boolean hasUnknownEnvironmentVariables(final String path) { return ENV_VAR_PATTERN.matcher(path).find(); } }
EnvironmentVariableReplacer { public boolean hasUnknownEnvironmentVariables(final String path) { return ENV_VAR_PATTERN.matcher(path).find(); } EnvironmentVariableReplacer();  EnvironmentVariableReplacer(final SystemVariableAccessor variableAccessor);  EnvironmentVariableReplacer(final SystemVariableAccessor variableAccessor,
            final Consumer<String> problemHandler); }
EnvironmentVariableReplacer { public boolean hasUnknownEnvironmentVariables(final String path) { return ENV_VAR_PATTERN.matcher(path).find(); } EnvironmentVariableReplacer();  EnvironmentVariableReplacer(final SystemVariableAccessor variableAccessor);  EnvironmentVariableReplacer(final SystemVariableAccessor variableAccessor,
            final Consumer<String> problemHandler); boolean hasUnknownEnvironmentVariables(final String path); String replaceKnownEnvironmentVariables(final String path); }
EnvironmentVariableReplacer { public boolean hasUnknownEnvironmentVariables(final String path) { return ENV_VAR_PATTERN.matcher(path).find(); } EnvironmentVariableReplacer();  EnvironmentVariableReplacer(final SystemVariableAccessor variableAccessor);  EnvironmentVariableReplacer(final SystemVariableAccessor variableAccessor,
            final Consumer<String> problemHandler); boolean hasUnknownEnvironmentVariables(final String path); String replaceKnownEnvironmentVariables(final String path);  }