summaryrefslogtreecommitdiffstats
path: root/container-search/src/test/java/com/yahoo/text
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@oath.com>2018-04-17 14:40:30 +0200
committerJon Bratseth <bratseth@oath.com>2018-04-17 14:40:30 +0200
commitc8cdfb65631a6814f2d85e18171badc9144ed33e (patch)
treef807a0a4a9fd288c658611e36e5e9bb25e740b65 /container-search/src/test/java/com/yahoo/text
parent6b9f956080484c22e894ee0ccd2692c2f442a333 (diff)
Remove usage of junit.framework
Diffstat (limited to 'container-search/src/test/java/com/yahoo/text')
-rw-r--r--container-search/src/test/java/com/yahoo/text/interpretation/test/AnnotationTestCase.java17
1 files changed, 12 insertions, 5 deletions
diff --git a/container-search/src/test/java/com/yahoo/text/interpretation/test/AnnotationTestCase.java b/container-search/src/test/java/com/yahoo/text/interpretation/test/AnnotationTestCase.java
index a947e46a40e..4427d5856d8 100644
--- a/container-search/src/test/java/com/yahoo/text/interpretation/test/AnnotationTestCase.java
+++ b/container-search/src/test/java/com/yahoo/text/interpretation/test/AnnotationTestCase.java
@@ -7,18 +7,23 @@ import java.util.HashSet;
import java.util.List;
import java.util.Set;
-import junit.framework.TestCase;
-
import com.yahoo.text.interpretation.AnnotationClass;
import com.yahoo.text.interpretation.Annotations;
import com.yahoo.text.interpretation.Interpretation;
import com.yahoo.text.interpretation.Span;
+import org.junit.Test;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
/**
- * @author <a href="mailto:arnebef@yahoo-inc.com">Arne Bergene Fossaa</a>
+ * @author Arne Bergene Fossaa
*/
-public class AnnotationTestCase extends TestCase {
+public class AnnotationTestCase {
+ @Test
public void testSimpleAnnotations() {
Interpretation i= new Interpretation("new york hotel");
i.annotate("sentence").put("isValid",true);
@@ -31,6 +36,7 @@ public class AnnotationTestCase extends TestCase {
assertNotNull(i.get("sentence"));
}
+ @Test
public void testAnnotationAPI() {
Interpretation a = new Interpretation("new york hotel");
@@ -80,6 +86,7 @@ public class AnnotationTestCase extends TestCase {
}
//The following testcase is a test with the api on a use_case, no cornercases here
+ @Test
public void testUsability() {
Interpretation interpretation = new Interpretation("new york crab pizza");
@@ -118,6 +125,6 @@ public class AnnotationTestCase extends TestCase {
assertEquals(2459115,woe_id);
}
-
}
+
}