diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2021-12-20 18:38:08 +0100 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2021-12-21 01:18:09 +0100 |
commit | e8f31cbe437ee969f4dd0490a0409b62b2fd045d (patch) | |
tree | 694203ae0423448b259c924c167ecb5584c36229 /config/src/test/java/com/yahoo/config/subscription/impl/FileConfigSubscriptionTest.java | |
parent | 5d6f586ccff9880a40366d51f75db5234795c0fc (diff) |
GC deprecated junit assertThat.
Diffstat (limited to 'config/src/test/java/com/yahoo/config/subscription/impl/FileConfigSubscriptionTest.java')
-rw-r--r-- | config/src/test/java/com/yahoo/config/subscription/impl/FileConfigSubscriptionTest.java | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/config/src/test/java/com/yahoo/config/subscription/impl/FileConfigSubscriptionTest.java b/config/src/test/java/com/yahoo/config/subscription/impl/FileConfigSubscriptionTest.java index 74af35e39dc..e37a5d7b36b 100644 --- a/config/src/test/java/com/yahoo/config/subscription/impl/FileConfigSubscriptionTest.java +++ b/config/src/test/java/com/yahoo/config/subscription/impl/FileConfigSubscriptionTest.java @@ -14,11 +14,10 @@ import java.io.FileWriter; import java.io.IOException; import java.nio.file.Files; -import static org.hamcrest.CoreMatchers.is; +import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotSame; import static org.junit.Assert.assertSame; -import static org.junit.Assert.assertThat; import static org.junit.Assert.assertTrue; /** @@ -45,11 +44,11 @@ public class FileConfigSubscriptionTest { new ConfigKey<>(SimpletypesConfig.class, ""), TEST_TYPES_FILE); assertTrue(sub.nextConfig(1000)); - assertThat(sub.getConfigState().getConfig().intval(), is(23)); + assertEquals(23, sub.getConfigState().getConfig().intval()); Thread.sleep(1000); writeConfig("intval", "33"); assertTrue(sub.nextConfig(1000)); - assertThat(sub.getConfigState().getConfig().intval(), is(33)); + assertEquals(33, sub.getConfigState().getConfig().intval()); } @Test @@ -59,12 +58,12 @@ public class FileConfigSubscriptionTest { new ConfigKey<>(SimpletypesConfig.class, ""), TEST_TYPES_FILE); assertTrue(sub.nextConfig(1000)); - assertThat(sub.getConfigState().getConfig().intval(), is(23)); + assertEquals(23, sub.getConfigState().getConfig().intval()); writeConfig("intval", "33"); sub.reload(1); assertTrue(sub.nextConfig(1000)); ConfigSubscription.ConfigState<SimpletypesConfig> configState = sub.getConfigState(); - assertThat(configState.getConfig().intval(), is(33)); + assertEquals(33, configState.getConfig().intval()); assertTrue(configState.isConfigChanged()); assertTrue(configState.isGenerationChanged()); @@ -81,7 +80,7 @@ public class FileConfigSubscriptionTest { sub.reload(2); assertTrue(sub.nextConfig(1000)); configState = sub.getConfigState(); - assertThat(configState.getConfig().intval(), is(33)); + assertEquals(33, configState.getConfig().intval()); assertFalse(configState.isConfigChanged()); assertTrue(configState.isGenerationChanged()); @@ -102,7 +101,7 @@ public class FileConfigSubscriptionTest { new DirSource(new File(cfgDir)), new TimingValues()); assertTrue(sub.nextConfig(1000)); - assertThat(sub.getConfigState().getConfig().configId(), is(cfgId)); + assertEquals(cfgId, sub.getConfigState().getConfig().configId()); } @Test(expected = IllegalArgumentException.class) |