aboutsummaryrefslogtreecommitdiffstats
path: root/config-model/src/test/java/com/yahoo/config/model/deploy/SystemModelTestCase.java
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2021-12-21 15:18:14 +0100
committerHenning Baldersheim <balder@yahoo-inc.com>2021-12-21 15:43:26 +0100
commite0fb5474ac171436e263a4950d72a2a405d379a2 (patch)
tree0b754bd09a06ef419a56f9df586446b386106669 /config-model/src/test/java/com/yahoo/config/model/deploy/SystemModelTestCase.java
parent28ae61202ad963955cf92719bab9b9d97181d5dd (diff)
GC use of deprecated junit assertThat and unify
Diffstat (limited to 'config-model/src/test/java/com/yahoo/config/model/deploy/SystemModelTestCase.java')
-rw-r--r--config-model/src/test/java/com/yahoo/config/model/deploy/SystemModelTestCase.java19
1 files changed, 12 insertions, 7 deletions
diff --git a/config-model/src/test/java/com/yahoo/config/model/deploy/SystemModelTestCase.java b/config-model/src/test/java/com/yahoo/config/model/deploy/SystemModelTestCase.java
index 8736f85e41b..66cbfbd537f 100644
--- a/config-model/src/test/java/com/yahoo/config/model/deploy/SystemModelTestCase.java
+++ b/config-model/src/test/java/com/yahoo/config/model/deploy/SystemModelTestCase.java
@@ -8,7 +8,10 @@ import com.yahoo.config.model.ConfigModelRegistry;
import com.yahoo.config.model.MapConfigModelRegistry;
import com.yahoo.config.model.ApplicationConfigProducerRoot;
import com.yahoo.net.HostName;
-import com.yahoo.vespa.model.*;
+import com.yahoo.vespa.model.ConfigProducer;
+import com.yahoo.vespa.model.HostResource;
+import com.yahoo.vespa.model.HostSystem;
+import com.yahoo.vespa.model.VespaModel;
import com.yahoo.vespa.model.test.ApiConfigModel;
import com.yahoo.vespa.model.test.SimpleConfigModel;
import com.yahoo.vespa.model.test.SimpleService;
@@ -19,8 +22,10 @@ import java.util.Iterator;
import java.util.Map;
import java.util.Set;
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
/**
* @author bratseth
@@ -52,7 +57,7 @@ public class SystemModelTestCase {
VespaModel vespaModel = getVespaModelDoNotValidateXml(TESTDIR + "metricsconfig");
SimpleService service0 = (SimpleService)vespaModel.getConfigProducer("simple/simpleservice.0").get();
vespaModel.getConfigProducer("simple/simpleservice.1");
- assertThat(service0.getDefaultMetricDimensions().get("clustername"), is("testClusterName"));
+ assertEquals("testClusterName", service0.getDefaultMetricDimensions().get("clustername"));
}
@Test
@@ -144,8 +149,8 @@ public class SystemModelTestCase {
ApplicationConfigProducerRoot root = vespaModel.getVespa();
assertEquals(5, vespaModel.configModelRepo().asMap().size());
- assertTrue(vespaModel.configModelRepo().asMap().keySet().contains("simple"));
- assertTrue(vespaModel.configModelRepo().asMap().keySet().contains("api"));
+ assertTrue(vespaModel.configModelRepo().asMap().containsKey("simple"));
+ assertTrue(vespaModel.configModelRepo().asMap().containsKey("api"));
assertTrue(root.getConfigIds().contains("simple/simpleservice.0"));
assertTrue(root.getConfigIds().contains("simple/simpleservice.1"));
assertTrue(root.getConfigIds().contains("api/apiservice.0"));
@@ -176,7 +181,7 @@ public class SystemModelTestCase {
getVespaModelDoNotValidateXml(TESTDIR + "doubleconfig");
fail("No exception upon two plugins with the same name");
} catch (RuntimeException expected) {
- assertThat(expected.getMessage(), is("Could not resolve tag <simpleplugin version=\"1.0\"> to a config model component"));
+ assertEquals("Could not resolve tag <simpleplugin version=\"1.0\"> to a config model component", expected.getMessage());
}
}