diff options
author | Jon Bratseth <bratseth@oath.com> | 2018-03-05 09:28:45 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-05 09:28:45 +0100 |
commit | 3fb3aa48f3e0b4b8ed20991e4515ec8667440d6b (patch) | |
tree | cd33cb3846d4648d6978ee2a60a38fca773113ce /container-di/src/test/java/com/yahoo/component/ComponentSpecTestCase.java | |
parent | 2da272e72160a216b997c242c1980dc01993ccc6 (diff) | |
parent | d79750502d379bf4025373e2de77353a2cab61f3 (diff) |
Merge pull request #5199 from vespa-engine/bratseth/less-old-junit
Remove junit.fdramework usage
Diffstat (limited to 'container-di/src/test/java/com/yahoo/component/ComponentSpecTestCase.java')
-rw-r--r-- | container-di/src/test/java/com/yahoo/component/ComponentSpecTestCase.java | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/container-di/src/test/java/com/yahoo/component/ComponentSpecTestCase.java b/container-di/src/test/java/com/yahoo/component/ComponentSpecTestCase.java index b22f5d60466..6fe58e99fda 100644 --- a/container-di/src/test/java/com/yahoo/component/ComponentSpecTestCase.java +++ b/container-di/src/test/java/com/yahoo/component/ComponentSpecTestCase.java @@ -1,13 +1,18 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.component; -import junit.framework.TestCase; +import org.junit.Test; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; /** - * @author <a href="mailto:arnebef@yahoo-inc.com">Arne Bergene Fossaa</a> + * @author Arne Bergene Fossaa */ -public class ComponentSpecTestCase extends TestCase { +public class ComponentSpecTestCase { + @Test public void testMatches() { ComponentId a = new ComponentId("test:1"); ComponentId b = new ComponentId("test:1.1.1"); @@ -46,6 +51,7 @@ public class ComponentSpecTestCase extends TestCase { } + @Test public void testMatchesWithNamespace() { ComponentId namespace = new ComponentId("namespace:2"); @@ -61,6 +67,7 @@ public class ComponentSpecTestCase extends TestCase { assertFalse(spec.matches(c)); } + @Test public void testStringValue() { assertStringValueEqualsInputSpec("a:1.0.0.alpha@namespace"); assertStringValueEqualsInputSpec("a:1.0.0.alpha"); @@ -72,4 +79,5 @@ public class ComponentSpecTestCase extends TestCase { assertEquals(componentSpec, new ComponentSpecification(componentSpec).stringValue()); } + } |