X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Ftest%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fcore%2FConfigurationSoneParserTest.java;h=7deb8058db4d93fa4f4647f65e103244772f2e9d;hp=e30048bc40b28346708eafd74c90606509c0c908;hb=7b55e0be6a3283e43a9bbab98f82aebdd948eb33;hpb=dfc936c18f048843bd0c47553713e752e9824658 diff --git a/src/test/java/net/pterodactylus/sone/core/ConfigurationSoneParserTest.java b/src/test/java/net/pterodactylus/sone/core/ConfigurationSoneParserTest.java index e30048b..7deb805 100644 --- a/src/test/java/net/pterodactylus/sone/core/ConfigurationSoneParserTest.java +++ b/src/test/java/net/pterodactylus/sone/core/ConfigurationSoneParserTest.java @@ -13,8 +13,8 @@ import static org.hamcrest.Matchers.hasSize; import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.notNullValue; import static org.hamcrest.Matchers.nullValue; -import static org.mockito.Matchers.anyString; -import static org.mockito.Matchers.eq; +import static org.mockito.ArgumentMatchers.anyString; +import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; @@ -88,9 +88,9 @@ public class ConfigurationSoneParserTest { private void setupEmptyProfile() { when(configuration.getStringValue(anyString())).thenReturn( - new TestValue(null)); + TestValue.from(null)); when(configuration.getIntValue(anyString())).thenReturn( - new TestValue(null)); + TestValue.from(null)); } @Test @@ -128,12 +128,12 @@ public class ConfigurationSoneParserTest { private void setupString(String nodeName, String value) { when(configuration.getStringValue(eq(nodeName))).thenReturn( - new TestValue(value)); + TestValue.from(value)); } private void setupInteger(String nodeName, Integer value) { when(configuration.getIntValue(eq(nodeName))).thenReturn( - new TestValue(value)); + TestValue.from(value)); } @Test @@ -180,7 +180,7 @@ public class ConfigurationSoneParserTest { private void setupLong(String nodeName, Long value) { when(configuration.getLongValue(eq(nodeName))).thenReturn( - new TestValue(value)); + TestValue.from(value)); } @Test(expected = InvalidPostFound.class) @@ -333,15 +333,15 @@ public class ConfigurationSoneParserTest { albumBuilderFactory); assertThat(topLevelAlbums, hasSize(2)); Album firstAlbum = topLevelAlbums.get(0); - assertThat(firstAlbum, isAlbum("A1", null, "T1", "D1", "I1")); + assertThat(firstAlbum, isAlbum("A1", null, "T1", "D1")); assertThat(firstAlbum.getAlbums(), emptyIterable()); assertThat(firstAlbum.getImages(), emptyIterable()); Album secondAlbum = topLevelAlbums.get(1); - assertThat(secondAlbum, isAlbum("A2", null, "T2", "D2", null)); + assertThat(secondAlbum, isAlbum("A2", null, "T2", "D2")); assertThat(secondAlbum.getAlbums(), hasSize(1)); assertThat(secondAlbum.getImages(), emptyIterable()); Album thirdAlbum = secondAlbum.getAlbums().get(0); - assertThat(thirdAlbum, isAlbum("A3", "A2", "T3", "D3", "I3")); + assertThat(thirdAlbum, isAlbum("A3", "A2", "T3", "D3")); assertThat(thirdAlbum.getAlbums(), emptyIterable()); assertThat(thirdAlbum.getImages(), emptyIterable()); }