diff options
author | Bjørn Christian Seime <bjorncs@yahooinc.com> | 2022-07-28 15:10:47 +0200 |
---|---|---|
committer | Bjørn Christian Seime <bjorncs@yahooinc.com> | 2022-07-28 15:10:47 +0200 |
commit | 9bf664ba9a153a404f03c39d5ba0f99eb32c4419 (patch) | |
tree | 1eeda1293a2d453c9acd11deb736be4e53e58975 /container-core/src/test/java/com/yahoo/component/provider | |
parent | 147fa8c912c8748a9b4eb25c67420841363f3be0 (diff) |
Convert container-core to junit5
Diffstat (limited to 'container-core/src/test/java/com/yahoo/component/provider')
-rw-r--r-- | container-core/src/test/java/com/yahoo/component/provider/test/ComponentRegistryTestCase.java | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/container-core/src/test/java/com/yahoo/component/provider/test/ComponentRegistryTestCase.java b/container-core/src/test/java/com/yahoo/component/provider/test/ComponentRegistryTestCase.java index 5f8fec564bc..eb7439df0ff 100644 --- a/container-core/src/test/java/com/yahoo/component/provider/test/ComponentRegistryTestCase.java +++ b/container-core/src/test/java/com/yahoo/component/provider/test/ComponentRegistryTestCase.java @@ -1,12 +1,11 @@ // Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.component.provider.test; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; - -import org.junit.Before; -import org.junit.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import com.yahoo.component.AbstractComponent; import com.yahoo.component.ComponentId; import com.yahoo.component.ComponentSpecification; @@ -48,7 +47,7 @@ public class ComponentRegistryTestCase { return new TestComponent(idInNamespace(namespace)); } - @Before + @BeforeEach public void before() { registry = new ComponentRegistry<>(); @@ -58,19 +57,19 @@ public class ComponentRegistryTestCase { } @Test - public void testAllPresent() { + void testAllPresent() { assertEquals(3, registry.getComponentCount()); } @Test - public void testIdNamespaceLookup() { + void testIdNamespaceLookup() { assertEquals(component1, registry.getComponent(idInNamespace(namespace1))); assertEquals(component2, registry.getComponent(idInNamespace(namespace2))); assertEquals(component21, registry.getComponent(idInNamespace(namespace21))); } @Test - public void testSpecNamespaceLookup() { + void testSpecNamespaceLookup() { assertEquals(component1, registry.getComponent(specInNamespace(namespace1))); // Version for namespace must match the specification exactly, so do not return version '1' when an @@ -80,7 +79,7 @@ public class ComponentRegistryTestCase { } @Test - public void testInnerComponentNotMixedWithTopLevelComponent() { + void testInnerComponentNotMixedWithTopLevelComponent() { assertNull(registry.getComponent(componentName)); TestComponent topLevel = new TestComponent(new ComponentId(componentName)); |