Committed by
Gerrit Code Review
Apply JUnit4 style test
Change-Id: I16a639dbf5f9dd7f08068cf94312e5d04cb8776a
Showing
6 changed files
with
8 additions
and
11 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 | ... | ... |
| ... | @@ -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()) | ... | ... |
| ... | @@ -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 | ... | ... |
| ... | @@ -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 | ... | ... |
| ... | @@ -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