Apply JUnit4 style test

Change-Id: I16a639dbf5f9dd7f08068cf94312e5d04cb8776a
This commit is contained in:
Sho SHIMIZU 2015-09-10 10:59:43 -07:00 committed by Gerrit Code Review
parent 883354c2a7
commit 8dc81ea90c
6 changed files with 12 additions and 15 deletions

View File

@ -16,7 +16,6 @@
package org.onosproject.dhcp; package org.onosproject.dhcp;
import com.google.common.testing.EqualsTester; import com.google.common.testing.EqualsTester;
import junit.framework.TestCase;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Test; import org.junit.Test;
import org.onlab.packet.Ip4Address; import org.onlab.packet.Ip4Address;
@ -31,7 +30,7 @@ import static org.junit.Assert.fail;
/** /**
* Unit Tests for IPAssignment class. * Unit Tests for IPAssignment class.
*/ */
public class IpAssignmentTest extends TestCase { public class IpAssignmentTest {
private final Date dateNow = new Date(); private final Date dateNow = new Date();
@ -98,4 +97,4 @@ public class IpAssignmentTest extends TestCase {
Assert.assertThat(e.getMessage(), containsString("must be specified")); Assert.assertThat(e.getMessage(), containsString("must be specified"));
} }
} }
} }

View File

@ -16,7 +16,6 @@
package org.onosproject.store.service; package org.onosproject.store.service;
import com.google.common.testing.EqualsTester; import com.google.common.testing.EqualsTester;
import junit.framework.TestCase;
import org.junit.Test; import org.junit.Test;
import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.MatcherAssert.assertThat;
@ -26,7 +25,7 @@ import static org.hamcrest.Matchers.is;
* Unit Tests for DatabseUpdate class. * Unit Tests for DatabseUpdate class.
*/ */
public class DatabaseUpdateTest extends TestCase { public class DatabaseUpdateTest {
private final DatabaseUpdate stats1 = DatabaseUpdate.newBuilder() private final DatabaseUpdate stats1 = DatabaseUpdate.newBuilder()
.withCurrentValue("1".getBytes()) .withCurrentValue("1".getBytes())
@ -124,4 +123,4 @@ public class DatabaseUpdateTest extends TestCase {
assertThat(stats1.toString(), is(stats1.toString())); assertThat(stats1.toString(), is(stats1.toString()));
} }
} }

View File

@ -16,7 +16,6 @@
package org.onosproject.store.service; package org.onosproject.store.service;
import com.google.common.testing.EqualsTester; import com.google.common.testing.EqualsTester;
import junit.framework.TestCase;
import org.junit.Test; import org.junit.Test;
import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.MatcherAssert.assertThat;
@ -25,7 +24,7 @@ import static org.hamcrest.Matchers.is;
/** /**
* MapEvent unit tests. * MapEvent unit tests.
*/ */
public class MapEventTest extends TestCase { public class MapEventTest {
private final Versioned<Integer> vStats = new Versioned<>(2, 1); private final Versioned<Integer> vStats = new Versioned<>(2, 1);
@ -58,4 +57,4 @@ public class MapEventTest extends TestCase {
.testEquals(); .testEquals();
} }
} }

View File

@ -16,7 +16,6 @@
package org.onosproject.store.service; package org.onosproject.store.service;
import com.google.common.testing.EqualsTester; import com.google.common.testing.EqualsTester;
import junit.framework.TestCase;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Test; import org.junit.Test;
@ -31,7 +30,7 @@ import static org.hamcrest.Matchers.notNullValue;
/** /**
* MultiValuedTimestamp unit tests. * MultiValuedTimestamp unit tests.
*/ */
public class MultiValuedTimestampTest extends TestCase { public class MultiValuedTimestampTest {
private final MultiValuedTimestamp<Integer, Integer> stats1 = new MultiValuedTimestamp<>(1, 3); private final MultiValuedTimestamp<Integer, Integer> stats1 = new MultiValuedTimestamp<>(1, 3);
@ -91,4 +90,4 @@ public class MultiValuedTimestampTest extends TestCase {
Assert.fail("Exception looking up constructors"); Assert.fail("Exception looking up constructors");
} }
} }
} }

View File

@ -16,7 +16,6 @@
package org.onosproject.store.service; package org.onosproject.store.service;
import com.google.common.testing.EqualsTester; import com.google.common.testing.EqualsTester;
import junit.framework.TestCase;
import org.junit.Test; import org.junit.Test;
import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.MatcherAssert.assertThat;
@ -25,7 +24,7 @@ import static org.hamcrest.Matchers.is;
/** /**
* Versioned unit tests. * Versioned unit tests.
*/ */
public class VersionedTest extends TestCase { public class VersionedTest {
private final Versioned<Integer> stats1 = new Versioned<>(1, 2, 3); private final Versioned<Integer> stats1 = new Versioned<>(1, 2, 3);

View File

@ -21,12 +21,14 @@ import com.esotericsoftware.minlog.Log;
import junit.framework.TestCase; import junit.framework.TestCase;
import static org.junit.Assert.fail;
/** /**
* Test of the Hexstring. * Test of the Hexstring.
* *
*/ */
public class HexStringTest extends TestCase { public class HexStringTest {
@Test @Test
public void testMarshalling() throws Exception { public void testMarshalling() throws Exception {