This is an automated email from the ASF dual-hosted git repository. btellier pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/james-project.git
commit b85e7fe3e3d9596e42128017d297c7585aba4c10 Author: Benoit Tellier <btell...@linagora.com> AuthorDate: Mon Apr 8 16:21:34 2019 +0700 JAMES-2708 Write missing tests for PropertiesProvider --- .../org/apache/james/utils/PropertiesProviderTest.java | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/server/container/guice/configuration/src/test/java/org/apache/james/utils/PropertiesProviderTest.java b/server/container/guice/configuration/src/test/java/org/apache/james/utils/PropertiesProviderTest.java index 19589ab..9bfdcc4 100644 --- a/server/container/guice/configuration/src/test/java/org/apache/james/utils/PropertiesProviderTest.java +++ b/server/container/guice/configuration/src/test/java/org/apache/james/utils/PropertiesProviderTest.java @@ -49,12 +49,18 @@ class PropertiesProviderTest { } @Test - void getConfigurationsShouldThrowWhenOnlyNotExistingFiles() throws Exception { + void getConfigurationsShouldThrowWhenOnlyNotExistingFiles() { assertThatThrownBy(() -> testee.getConfigurations("c", "d")) .isInstanceOf(FileNotFoundException.class); } @Test + void getConfigurationShouldThrowWhenNotExistingFile() { + assertThatThrownBy(() -> testee.getConfiguration("d")) + .isInstanceOf(FileNotFoundException.class); + } + + @Test void getConfigurationShouldReturnFirstExistingFile() throws Exception { assertThat(testee.getConfigurations("a", "b").getString("prop")) .isEqualTo("value1"); @@ -65,4 +71,10 @@ class PropertiesProviderTest { assertThat(testee.getConfigurations("c", "b").getString("prop")) .isEqualTo("value2"); } + + @Test + void getConfigurationShouldLoadProperties() throws Exception { + assertThat(testee.getConfiguration("a").getString("prop")) + .isEqualTo("value1"); + } } \ No newline at end of file --------------------------------------------------------------------- To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org