Update junit Assert imports
authorRobert Varga <rovarga@cisco.com>
Fri, 7 Nov 2014 12:42:30 +0000 (13:42 +0100)
committerRobert Varga <rovarga@cisco.com>
Fri, 7 Nov 2014 13:10:32 +0000 (14:10 +0100)
JUnit 4.11 has moved Assert to org.junit, and deprecated
junit.framework.Assert. This adjust the imports to fix the warnings.

Change-Id: Iecbf2a1b4ae097989e840ad6f6d5bf759c521639
Signed-off-by: Robert Varga <rovarga@cisco.com>
opendaylight/md-sal/sal-rest-docgen/src/test/java/org/opendaylight/controller/sal/rest/doc/impl/ApiDocGeneratorTest.java
opendaylight/netconf/netconf-impl/src/test/java/org/opendaylight/controller/netconf/impl/AdditionalHeaderParserTest.java
opendaylight/netconf/netconf-impl/src/test/java/org/opendaylight/controller/netconf/impl/ExiEncodeDecodeTest.java
opendaylight/netconf/netconf-impl/src/test/java/org/opendaylight/controller/netconf/impl/mapping/operations/DefaultGetSchemaTest.java
opendaylight/netconf/netconf-it/src/test/java/org/opendaylight/controller/netconf/it/NetconfConfigPersisterITTest.java

index 9165281f9d27cc29cc6b236f73e518c886452ed5..02c5137fe9dc3b788c1cd0feba54f44ecee9a8d5 100644 (file)
@@ -14,7 +14,6 @@ import java.util.Map.Entry;
 import java.util.Set;
 import java.util.TreeSet;
 import javax.ws.rs.core.UriInfo;
-import junit.framework.Assert;
 import org.json.JSONException;
 import org.json.JSONObject;
 import org.junit.After;
@@ -205,7 +204,7 @@ public class ApiDocGeneratorTest {
             if (m.getKey().getAbsolutePath().endsWith("toaster.yang")) {
                 ApiDeclaration doc = generator.getSwaggerDocSpec(m.getValue(), "http://localhost:8080/restconf", "",
                         schemaContext);
-                Assert.assertNotNull(doc);
+                assertNotNull(doc);
 
                 // testing bugs.opendaylight.org bug 1290. UnionType model type.
                 String jsonString = doc.getModels().toString();
index c2dcd679210f1d66cd055e48a9c05494d3d8d374..444d4fe4abad44c6168d7ef2befff13f5d1af7fe 100644 (file)
@@ -7,8 +7,7 @@
  */
 package org.opendaylight.controller.netconf.impl;
 
-import junit.framework.Assert;
-
+import static org.junit.Assert.assertEquals;
 import org.junit.Test;
 import org.opendaylight.controller.netconf.util.messages.NetconfHelloMessageAdditionalHeader;
 
@@ -18,18 +17,18 @@ public class AdditionalHeaderParserTest {
     public void testParsing() throws Exception {
         String s = "[netconf;10.12.0.102:48528;ssh;;;;;;]";
         NetconfHelloMessageAdditionalHeader header = NetconfHelloMessageAdditionalHeader.fromString(s);
-        Assert.assertEquals("netconf", header.getUserName());
-        Assert.assertEquals("10.12.0.102", header.getAddress());
-        Assert.assertEquals("ssh", header.getTransport());
+        assertEquals("netconf", header.getUserName());
+        assertEquals("10.12.0.102", header.getAddress());
+        assertEquals("ssh", header.getTransport());
     }
 
     @Test
     public void testParsing2() throws Exception {
         String s = "[tomas;10.0.0.0/10000;tcp;1000;1000;;/home/tomas;;]";
         NetconfHelloMessageAdditionalHeader header = NetconfHelloMessageAdditionalHeader.fromString(s);
-        Assert.assertEquals("tomas", header.getUserName());
-        Assert.assertEquals("10.0.0.0", header.getAddress());
-        Assert.assertEquals("tcp", header.getTransport());
+        assertEquals("tomas", header.getUserName());
+        assertEquals("10.0.0.0", header.getAddress());
+        assertEquals("tcp", header.getTransport());
     }
 
     @Test(expected = IllegalArgumentException.class)
index 58c6566d91dfb7b86230e6fcd48cfd3f12d12912..b54b2180338eab2016200b4f23aad94e7f286167 100644 (file)
@@ -7,7 +7,7 @@
  */
 package org.opendaylight.controller.netconf.impl;
 
-import static junit.framework.Assert.assertNotNull;
+import static org.junit.Assert.assertNotNull;
 
 import org.junit.Test;
 import org.opendaylight.controller.netconf.api.NetconfMessage;
index b655e90f2bbbea10f0bc4958b6fab2ab57922a21..4218176f1d8ff7297f769c9c0f097287c5ae24a8 100644 (file)
@@ -8,8 +8,13 @@
 
 package org.opendaylight.controller.netconf.impl.mapping.operations;
 
+import static org.junit.Assert.assertNotNull;
+import static org.mockito.Matchers.any;
+import static org.mockito.Matchers.anyString;
+import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.doThrow;
+import static org.mockito.Mockito.mock;
 import com.google.common.base.Optional;
-import junit.framework.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.opendaylight.controller.netconf.api.NetconfDocumentedException;
@@ -18,13 +23,6 @@ import org.opendaylight.controller.netconf.util.xml.XmlElement;
 import org.opendaylight.controller.netconf.util.xml.XmlUtil;
 import org.w3c.dom.Document;
 
-import static org.junit.Assert.assertNotNull;
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.anyString;
-import static org.mockito.Mockito.doReturn;
-import static org.mockito.Mockito.doThrow;
-import static org.mockito.Mockito.mock;
-
 public class DefaultGetSchemaTest {
 
     private CapabilityProvider cap;
index d8eb841a799faf1993f025126bb241d8ceba4c66..cc170358dd2c0e5e82fbbb644c889ebf9dc5c7ee 100644 (file)
@@ -7,7 +7,7 @@
  */
 package org.opendaylight.controller.netconf.it;
 
-import static junit.framework.Assert.assertEquals;
+import static org.junit.Assert.assertEquals;
 import static org.mockito.Matchers.any;
 import static org.mockito.Matchers.anyString;
 import static org.mockito.Mockito.doAnswer;