diff options
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.java | 29 |
1 files changed, 13 insertions, 16 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 70b9fc54882..a9f97d95b74 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 @@ -16,16 +16,13 @@ import com.yahoo.vespa.model.test.ApiConfigModel; import com.yahoo.vespa.model.test.SimpleConfigModel; import com.yahoo.vespa.model.test.SimpleService; import com.yahoo.vespa.model.test.utils.VespaModelCreatorWithFilePkg; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.util.Iterator; import java.util.Map; import java.util.Set; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; +import static org.junit.jupiter.api.Assertions.*; /** * @author bratseth @@ -53,21 +50,21 @@ public class SystemModelTestCase { } @Test - public void testMetrics() { + void testMetrics() { VespaModel vespaModel = getVespaModelDoNotValidateXml(TESTDIR + "metricsconfig"); - SimpleService service0 = (SimpleService)vespaModel.getConfigProducer("simple/simpleservice.0").get(); + SimpleService service0 = (SimpleService) vespaModel.getConfigProducer("simple/simpleservice.0").get(); vespaModel.getConfigProducer("simple/simpleservice.1"); assertEquals("testClusterName", service0.getDefaultMetricDimensions().get("clustername")); } @Test - public void testVespaModel() { + void testVespaModel() { VespaModel vespaModel = getVespaModelDoNotValidateXml(TESTDIR + "simpleconfig/"); assertNotNull(vespaModel); - assertEquals("There are two instances of the simple model + Routing and AdminModel (set up implicitly)", 4, vespaModel.configModelRepo().asMap().size()); - assertNotNull("One gets the default name as there is no explicit id", vespaModel.configModelRepo().asMap().get("simple")); - assertNotNull("The other gets the explicit id as name", vespaModel.configModelRepo().asMap().get("second")); + assertEquals(4, vespaModel.configModelRepo().asMap().size(), "There are two instances of the simple model + Routing and AdminModel (set up implicitly)"); + assertNotNull(vespaModel.configModelRepo().asMap().get("simple"), "One gets the default name as there is no explicit id"); + assertNotNull(vespaModel.configModelRepo().asMap().get("second"), "The other gets the explicit id as name"); ApplicationConfigProducerRoot root = vespaModel.getVespa(); assertNotNull(root); @@ -108,7 +105,7 @@ public class SystemModelTestCase { } @Test - public void testHostSystem() { + void testHostSystem() { VespaModel vespaModel = getVespaModelDoNotValidateXml(TESTDIR + "simpleconfig/"); HostSystem hostSystem = vespaModel.hostSystem(); @@ -129,7 +126,7 @@ public class SystemModelTestCase { } @Test - public void testBasePorts() { + void testBasePorts() { VespaModel vespaModel = getVespaModelDoNotValidateXml(TESTDIR + "simpleconfig"); assertNotNull(vespaModel); @@ -142,7 +139,7 @@ public class SystemModelTestCase { * Be sure to update it as well if you change this. */ @Test - public void testPlugins() { + void testPlugins() { VespaModel vespaModel = getVespaModelDoNotValidateXml(TESTDIR + "plugins"); assertNotNull(vespaModel); @@ -169,14 +166,14 @@ public class SystemModelTestCase { assertEquals("routing", plugin.getId()); assertEquals(vespaModel.getConfig(StandardConfig.class, "api/apiservice.0").astring(), "apiservice"); - + assertEquals(vespaModel.getConfig(StandardConfig.class, "simple/simpleservice.0").astring(), "simpleservice"); assertEquals(vespaModel.getConfig(StandardConfig.class, "simple/simpleservice.1").astring(), "simpleservice"); assertEquals(vespaModel.getConfig(StandardConfig.class, "simple2/simpleservice.0").astring(), "simpleservice"); } @Test - public void testEqualPlugins() { + void testEqualPlugins() { try { getVespaModelDoNotValidateXml(TESTDIR + "doubleconfig"); fail("No exception upon two plugins with the same name"); |