aboutsummaryrefslogtreecommitdiffstats
path: root/jrt/tests/com/yahoo/jrt/DetachTest.java
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@oath.com>2018-04-27 13:35:40 +0200
committerJon Bratseth <bratseth@oath.com>2018-04-27 13:35:40 +0200
commitd12f069567a99536c84598700ad4f00048936cde (patch)
tree61f04cddb5fe535694835497620cfdeb26a82dbf /jrt/tests/com/yahoo/jrt/DetachTest.java
parentd83814043998817d404b922e3050ce2006e8ec19 (diff)
Remove usage of junit.framework
Diffstat (limited to 'jrt/tests/com/yahoo/jrt/DetachTest.java')
-rw-r--r--jrt/tests/com/yahoo/jrt/DetachTest.java16
1 files changed, 11 insertions, 5 deletions
diff --git a/jrt/tests/com/yahoo/jrt/DetachTest.java b/jrt/tests/com/yahoo/jrt/DetachTest.java
index 2d4f7084f48..1c1256f0689 100644
--- a/jrt/tests/com/yahoo/jrt/DetachTest.java
+++ b/jrt/tests/com/yahoo/jrt/DetachTest.java
@@ -1,8 +1,13 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.jrt;
+import org.junit.After;
+import org.junit.Before;
-public class DetachTest extends junit.framework.TestCase {
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+public class DetachTest {
Test.Orb server;
Acceptor acceptor;
@@ -11,10 +16,7 @@ public class DetachTest extends junit.framework.TestCase {
Test.Receptor receptor;
Test.Barrier barrier;
- public DetachTest(String name) {
- super(name);
- }
-
+ @Before
public void setUp() throws ListenFailedException {
server = new Test.Orb(new Transport());
client = new Test.Orb(new Transport());
@@ -31,6 +33,7 @@ public class DetachTest extends junit.framework.TestCase {
barrier = new Test.Barrier();
}
+ @After
public void tearDown() {
target.close();
acceptor.shutdown().join();
@@ -61,6 +64,7 @@ public class DetachTest extends junit.framework.TestCase {
barrier.waitFor();
}
+ @org.junit.Test
public void testDetach() {
Test.Waiter w1 = new Test.Waiter();
Request req1 = new Request("d_inc");
@@ -103,6 +107,7 @@ public class DetachTest extends junit.framework.TestCase {
assertTrue(client.readBytes == server.writeBytes);
}
+ @org.junit.Test
public void testBogusDetach() {
Request req1 = new Request("inc_b");
req1.parameters().add(new Int32Value(200));
@@ -133,4 +138,5 @@ public class DetachTest extends junit.framework.TestCase {
assertEquals(1, req3.returnValues().size());
assertEquals(101, req3.returnValues().get(0).asInt32());
}
+
}