Committed by
Gerrit Code Review
Apply JUnit4 style test
Change-Id: I16a639dbf5f9dd7f08068cf94312e5d04cb8776a
Showing
6 changed files
with
12 additions
and
15 deletions
... | @@ -16,7 +16,6 @@ | ... | @@ -16,7 +16,6 @@ |
16 | package org.onosproject.dhcp; | 16 | package org.onosproject.dhcp; |
17 | 17 | ||
18 | import com.google.common.testing.EqualsTester; | 18 | import com.google.common.testing.EqualsTester; |
19 | -import junit.framework.TestCase; | ||
20 | import org.junit.Assert; | 19 | import org.junit.Assert; |
21 | import org.junit.Test; | 20 | import org.junit.Test; |
22 | import org.onlab.packet.Ip4Address; | 21 | import org.onlab.packet.Ip4Address; |
... | @@ -31,7 +30,7 @@ import static org.junit.Assert.fail; | ... | @@ -31,7 +30,7 @@ import static org.junit.Assert.fail; |
31 | /** | 30 | /** |
32 | * Unit Tests for IPAssignment class. | 31 | * Unit Tests for IPAssignment class. |
33 | */ | 32 | */ |
34 | -public class IpAssignmentTest extends TestCase { | 33 | +public class IpAssignmentTest { |
35 | 34 | ||
36 | private final Date dateNow = new Date(); | 35 | private final Date dateNow = new Date(); |
37 | 36 | ||
... | @@ -98,4 +97,4 @@ public class IpAssignmentTest extends TestCase { | ... | @@ -98,4 +97,4 @@ public class IpAssignmentTest extends TestCase { |
98 | Assert.assertThat(e.getMessage(), containsString("must be specified")); | 97 | Assert.assertThat(e.getMessage(), containsString("must be specified")); |
99 | } | 98 | } |
100 | } | 99 | } |
101 | -} | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
100 | +} | ... | ... |
... | @@ -16,7 +16,6 @@ | ... | @@ -16,7 +16,6 @@ |
16 | package org.onosproject.store.service; | 16 | package org.onosproject.store.service; |
17 | 17 | ||
18 | import com.google.common.testing.EqualsTester; | 18 | import com.google.common.testing.EqualsTester; |
19 | -import junit.framework.TestCase; | ||
20 | import org.junit.Test; | 19 | import org.junit.Test; |
21 | 20 | ||
22 | import static org.hamcrest.MatcherAssert.assertThat; | 21 | import static org.hamcrest.MatcherAssert.assertThat; |
... | @@ -26,7 +25,7 @@ import static org.hamcrest.Matchers.is; | ... | @@ -26,7 +25,7 @@ import static org.hamcrest.Matchers.is; |
26 | * Unit Tests for DatabseUpdate class. | 25 | * Unit Tests for DatabseUpdate class. |
27 | */ | 26 | */ |
28 | 27 | ||
29 | -public class DatabaseUpdateTest extends TestCase { | 28 | +public class DatabaseUpdateTest { |
30 | 29 | ||
31 | private final DatabaseUpdate stats1 = DatabaseUpdate.newBuilder() | 30 | private final DatabaseUpdate stats1 = DatabaseUpdate.newBuilder() |
32 | .withCurrentValue("1".getBytes()) | 31 | .withCurrentValue("1".getBytes()) |
... | @@ -124,4 +123,4 @@ public class DatabaseUpdateTest extends TestCase { | ... | @@ -124,4 +123,4 @@ public class DatabaseUpdateTest extends TestCase { |
124 | assertThat(stats1.toString(), is(stats1.toString())); | 123 | assertThat(stats1.toString(), is(stats1.toString())); |
125 | } | 124 | } |
126 | 125 | ||
127 | -} | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
126 | +} | ... | ... |
... | @@ -16,7 +16,6 @@ | ... | @@ -16,7 +16,6 @@ |
16 | package org.onosproject.store.service; | 16 | package org.onosproject.store.service; |
17 | 17 | ||
18 | import com.google.common.testing.EqualsTester; | 18 | import com.google.common.testing.EqualsTester; |
19 | -import junit.framework.TestCase; | ||
20 | import org.junit.Test; | 19 | import org.junit.Test; |
21 | 20 | ||
22 | import static org.hamcrest.MatcherAssert.assertThat; | 21 | import static org.hamcrest.MatcherAssert.assertThat; |
... | @@ -25,7 +24,7 @@ import static org.hamcrest.Matchers.is; | ... | @@ -25,7 +24,7 @@ import static org.hamcrest.Matchers.is; |
25 | /** | 24 | /** |
26 | * MapEvent unit tests. | 25 | * MapEvent unit tests. |
27 | */ | 26 | */ |
28 | -public class MapEventTest extends TestCase { | 27 | +public class MapEventTest { |
29 | 28 | ||
30 | private final Versioned<Integer> vStats = new Versioned<>(2, 1); | 29 | private final Versioned<Integer> vStats = new Versioned<>(2, 1); |
31 | 30 | ||
... | @@ -58,4 +57,4 @@ public class MapEventTest extends TestCase { | ... | @@ -58,4 +57,4 @@ public class MapEventTest extends TestCase { |
58 | .testEquals(); | 57 | .testEquals(); |
59 | } | 58 | } |
60 | 59 | ||
61 | -} | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
60 | +} | ... | ... |
... | @@ -16,7 +16,6 @@ | ... | @@ -16,7 +16,6 @@ |
16 | package org.onosproject.store.service; | 16 | package org.onosproject.store.service; |
17 | 17 | ||
18 | import com.google.common.testing.EqualsTester; | 18 | import com.google.common.testing.EqualsTester; |
19 | -import junit.framework.TestCase; | ||
20 | 19 | ||
21 | import org.junit.Assert; | 20 | import org.junit.Assert; |
22 | import org.junit.Test; | 21 | import org.junit.Test; |
... | @@ -31,7 +30,7 @@ import static org.hamcrest.Matchers.notNullValue; | ... | @@ -31,7 +30,7 @@ import static org.hamcrest.Matchers.notNullValue; |
31 | /** | 30 | /** |
32 | * MultiValuedTimestamp unit tests. | 31 | * MultiValuedTimestamp unit tests. |
33 | */ | 32 | */ |
34 | -public class MultiValuedTimestampTest extends TestCase { | 33 | +public class MultiValuedTimestampTest { |
35 | 34 | ||
36 | private final MultiValuedTimestamp<Integer, Integer> stats1 = new MultiValuedTimestamp<>(1, 3); | 35 | private final MultiValuedTimestamp<Integer, Integer> stats1 = new MultiValuedTimestamp<>(1, 3); |
37 | 36 | ||
... | @@ -91,4 +90,4 @@ public class MultiValuedTimestampTest extends TestCase { | ... | @@ -91,4 +90,4 @@ public class MultiValuedTimestampTest extends TestCase { |
91 | Assert.fail("Exception looking up constructors"); | 90 | Assert.fail("Exception looking up constructors"); |
92 | } | 91 | } |
93 | } | 92 | } |
94 | -} | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
93 | +} | ... | ... |
... | @@ -16,7 +16,6 @@ | ... | @@ -16,7 +16,6 @@ |
16 | package org.onosproject.store.service; | 16 | package org.onosproject.store.service; |
17 | 17 | ||
18 | import com.google.common.testing.EqualsTester; | 18 | import com.google.common.testing.EqualsTester; |
19 | -import junit.framework.TestCase; | ||
20 | import org.junit.Test; | 19 | import org.junit.Test; |
21 | 20 | ||
22 | import static org.hamcrest.MatcherAssert.assertThat; | 21 | import static org.hamcrest.MatcherAssert.assertThat; |
... | @@ -25,7 +24,7 @@ import static org.hamcrest.Matchers.is; | ... | @@ -25,7 +24,7 @@ import static org.hamcrest.Matchers.is; |
25 | /** | 24 | /** |
26 | * Versioned unit tests. | 25 | * Versioned unit tests. |
27 | */ | 26 | */ |
28 | -public class VersionedTest extends TestCase { | 27 | +public class VersionedTest { |
29 | 28 | ||
30 | private final Versioned<Integer> stats1 = new Versioned<>(1, 2, 3); | 29 | private final Versioned<Integer> stats1 = new Versioned<>(1, 2, 3); |
31 | 30 | ... | ... |
... | @@ -21,12 +21,14 @@ import com.esotericsoftware.minlog.Log; | ... | @@ -21,12 +21,14 @@ import com.esotericsoftware.minlog.Log; |
21 | 21 | ||
22 | import junit.framework.TestCase; | 22 | import junit.framework.TestCase; |
23 | 23 | ||
24 | +import static org.junit.Assert.fail; | ||
25 | + | ||
24 | /** | 26 | /** |
25 | * Test of the Hexstring. | 27 | * Test of the Hexstring. |
26 | * | 28 | * |
27 | */ | 29 | */ |
28 | 30 | ||
29 | -public class HexStringTest extends TestCase { | 31 | +public class HexStringTest { |
30 | 32 | ||
31 | @Test | 33 | @Test |
32 | public void testMarshalling() throws Exception { | 34 | public void testMarshalling() throws Exception { | ... | ... |
-
Please register or login to post a comment