summaryrefslogtreecommitdiffstats
path: root/vespajlib/src/test/java/com/yahoo/protect/TestErrorMessage.java
diff options
context:
space:
mode:
Diffstat (limited to 'vespajlib/src/test/java/com/yahoo/protect/TestErrorMessage.java')
-rw-r--r--vespajlib/src/test/java/com/yahoo/protect/TestErrorMessage.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/vespajlib/src/test/java/com/yahoo/protect/TestErrorMessage.java b/vespajlib/src/test/java/com/yahoo/protect/TestErrorMessage.java
index 3a923ebbb47..58a35b2bddf 100644
--- a/vespajlib/src/test/java/com/yahoo/protect/TestErrorMessage.java
+++ b/vespajlib/src/test/java/com/yahoo/protect/TestErrorMessage.java
@@ -1,11 +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.protect;
+import org.junit.Test;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
/**
* @author bratseth
*/
-public class TestErrorMessage extends junit.framework.TestCase {
+public class TestErrorMessage {
+ @Test
public void testErrorMessages() {
ErrorMessage m1=new ErrorMessage(17,"Message");
ErrorMessage m2=new ErrorMessage(17,"Message","Detail");
@@ -17,6 +24,7 @@ public class TestErrorMessage extends junit.framework.TestCase {
assertEquals("error : Message (Detail: Throwable message)",m3.toString());
}
+ @Test
public void testErrorMessageEquality() {
assertEquals(new ErrorMessage(17,"Message"),new ErrorMessage(17,"Message"));
assertFalse(new ErrorMessage(16,"Message").equals(new ErrorMessage(17,"Message")));