Make sure to pick up junit version from odlparent 07/13207/2
authorRobert Varga <rovarga@cisco.com>
Fri, 28 Nov 2014 15:07:41 +0000 (16:07 +0100)
committerRobert Varga <rovarga@cisco.com>
Fri, 28 Nov 2014 15:41:25 +0000 (16:41 +0100)
Fixes 4.10/4.11 inconsistency reported by maven. Also migrates imports
of Assert to the new place.

Change-Id: Id0953e69207ac9507b6baa0cc47bfaa938d86655
Signed-off-by: Robert Varga <rovarga@cisco.com>
14 files changed:
openflow-protocol-api/src/test/java/org/opendaylight/openflowjava/protocol/api/keys/KeysTest.java
openflow-protocol-api/src/test/java/org/opendaylight/openflowjava/protocol/api/util/BinContentTest.java
openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/core/connection/ChannelOutboundQueue02Test.java
openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/core/connection/ConnectionAdapterImp02lTest.java
openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/TypeToClassKeyTest.java
openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/serialization/factories/GetQueueConfigInputMessageFactoryTest.java
openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/serialization/factories/MeterModInputMessageFactoryTest.java
openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/serialization/factories/OF10PortModInputMessageFactoryTest.java
openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/serialization/factories/OF10QueueGetConfigInputMessageFactoryTest.java
openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/serialization/factories/PortModInputMessageFactoryTest.java
openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/serialization/factories/RoleRequestInputMessageFactoryTest.java
openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/serialization/factories/TableModInputMessageFactoryTest.java
openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/util/OF10MatchSerializerTest.java
pom.xml

index 6f2eb5138a52657f38322060cec798e5072dad3a..f270bd92d2653af918ed6da64a6e949bf9c068b2 100644 (file)
@@ -1,7 +1,6 @@
 package org.opendaylight.openflowjava.protocol.api.keys;
 
-import junit.framework.Assert;
-
+import org.junit.Assert;
 import org.junit.Test;
 import org.opendaylight.openflowjava.protocol.api.keys.ActionDeserializerKey;
 import org.opendaylight.openflowjava.protocol.api.keys.ActionSerializerKey;
index af09e0cb545f595ecdba26f2408ae22da863a89b..3c2bc650c7d22a83679578cee6f9a62bc0ca9382 100644 (file)
@@ -1,64 +1,63 @@
-/*\r
- * Copyright (c) 2013 Pantheon Technologies s.r.o. and others.  All rights reserved.\r
- *\r
- * This program and the accompanying materials are made available under the\r
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
- * and is available at http://www.eclipse.org/legal/epl-v10.html\r
- */\r
-\r
-package org.opendaylight.openflowjava.protocol.api.util;\r
-\r
-import junit.framework.Assert;\r
-\r
-import org.junit.Test;\r
-\r
-/**\r
- * @author michal.polkorab\r
- */\r
-public class BinContentTest {\r
-\r
-    /**\r
-     * Testing correct conversion from signed int value to unsigned long value\r
-     */\r
-    @Test\r
-    public void testIntToUnsignedLong() {\r
-        int a = 0;\r
-        int b = 1;\r
-        int c = -1;\r
-        int d = Integer.MAX_VALUE;\r
-        int e = Integer.MIN_VALUE;\r
-        int f = 12345;\r
-        Assert.assertEquals("Wrong conversion", 0, BinContent.intToUnsignedLong(a));\r
-        Assert.assertEquals("Wrong conversion", 1, BinContent.intToUnsignedLong(b));\r
-        Assert.assertEquals("Wrong conversion", 4294967295L, BinContent.intToUnsignedLong(c));\r
-        Assert.assertEquals("Wrong conversion", Integer.MAX_VALUE, BinContent.intToUnsignedLong(d));\r
-        Assert.assertEquals("Wrong conversion", ((long) Integer.MAX_VALUE) + 1, BinContent.intToUnsignedLong(e));\r
-        Assert.assertEquals("Wrong conversion", 12345, BinContent.intToUnsignedLong(f));\r
-    }\r
-\r
-    /**\r
-     * Testing correct conversion from unsigned long value to signed int value\r
-     */\r
-    @Test\r
-    public void testLongToSignedInt() {\r
-        long a = 0;\r
-        long b = 1;\r
-        long c = -1;\r
-        long d = Integer.MAX_VALUE;\r
-        long e = Integer.MIN_VALUE;\r
-        long f = 12345;\r
-        long g = Long.MAX_VALUE;\r
-        long h = 1094624935644L;\r
-        long i = ((long) Integer.MAX_VALUE) + 1;\r
-        Assert.assertEquals("Wrong conversion", 0, BinContent.longToSignedInt(a));\r
-        Assert.assertEquals("Wrong conversion", 1, BinContent.longToSignedInt(b));\r
-        Assert.assertEquals("Wrong conversion", -1, BinContent.longToSignedInt(c));\r
-        Assert.assertEquals("Wrong conversion", Integer.MAX_VALUE, BinContent.longToSignedInt(d));\r
-        Assert.assertEquals("Wrong conversion", Integer.MIN_VALUE, BinContent.longToSignedInt(e));\r
-        Assert.assertEquals("Wrong conversion", 12345, BinContent.longToSignedInt(f));\r
-        Assert.assertEquals("Wrong conversion", -1, BinContent.longToSignedInt(g));\r
-        Assert.assertEquals("Wrong conversion", -591724836, BinContent.longToSignedInt(h));\r
-        Assert.assertEquals("Wrong conversion", Integer.MIN_VALUE, BinContent.longToSignedInt(i));\r
-    }\r
-    \r
-}\r
+/*
+ * Copyright (c) 2013 Pantheon Technologies s.r.o. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+
+package org.opendaylight.openflowjava.protocol.api.util;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * @author michal.polkorab
+ */
+public class BinContentTest {
+
+    /**
+     * Testing correct conversion from signed int value to unsigned long value
+     */
+    @Test
+    public void testIntToUnsignedLong() {
+        int a = 0;
+        int b = 1;
+        int c = -1;
+        int d = Integer.MAX_VALUE;
+        int e = Integer.MIN_VALUE;
+        int f = 12345;
+        Assert.assertEquals("Wrong conversion", 0, BinContent.intToUnsignedLong(a));
+        Assert.assertEquals("Wrong conversion", 1, BinContent.intToUnsignedLong(b));
+        Assert.assertEquals("Wrong conversion", 4294967295L, BinContent.intToUnsignedLong(c));
+        Assert.assertEquals("Wrong conversion", Integer.MAX_VALUE, BinContent.intToUnsignedLong(d));
+        Assert.assertEquals("Wrong conversion", ((long) Integer.MAX_VALUE) + 1, BinContent.intToUnsignedLong(e));
+        Assert.assertEquals("Wrong conversion", 12345, BinContent.intToUnsignedLong(f));
+    }
+
+    /**
+     * Testing correct conversion from unsigned long value to signed int value
+     */
+    @Test
+    public void testLongToSignedInt() {
+        long a = 0;
+        long b = 1;
+        long c = -1;
+        long d = Integer.MAX_VALUE;
+        long e = Integer.MIN_VALUE;
+        long f = 12345;
+        long g = Long.MAX_VALUE;
+        long h = 1094624935644L;
+        long i = ((long) Integer.MAX_VALUE) + 1;
+        Assert.assertEquals("Wrong conversion", 0, BinContent.longToSignedInt(a));
+        Assert.assertEquals("Wrong conversion", 1, BinContent.longToSignedInt(b));
+        Assert.assertEquals("Wrong conversion", -1, BinContent.longToSignedInt(c));
+        Assert.assertEquals("Wrong conversion", Integer.MAX_VALUE, BinContent.longToSignedInt(d));
+        Assert.assertEquals("Wrong conversion", Integer.MIN_VALUE, BinContent.longToSignedInt(e));
+        Assert.assertEquals("Wrong conversion", 12345, BinContent.longToSignedInt(f));
+        Assert.assertEquals("Wrong conversion", -1, BinContent.longToSignedInt(g));
+        Assert.assertEquals("Wrong conversion", -591724836, BinContent.longToSignedInt(h));
+        Assert.assertEquals("Wrong conversion", Integer.MIN_VALUE, BinContent.longToSignedInt(i));
+    }
+
+}
index 3719d3dc254605565718afdc926d7b6097ac159d..80a58df26ed8d37ef6f909b1154ce097eef214a2 100644 (file)
@@ -16,9 +16,8 @@ import io.netty.channel.embedded.EmbeddedChannel;
 import java.net.InetSocketAddress;
 import java.util.concurrent.TimeUnit;
 
-import junit.framework.Assert;
-
 import org.junit.After;
+import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.mockito.Mock;
index bc9e93ba52ce9831b0500ce699afa31b8af936dc..0e561fdc74803ceb739c9d87df66fa5b13b235a6 100644 (file)
@@ -15,9 +15,8 @@ import io.netty.channel.embedded.EmbeddedChannel;
 import java.net.InetSocketAddress;
 import java.util.concurrent.TimeUnit;
 
-import junit.framework.Assert;
-
 import org.junit.After;
+import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.mockito.Mock;
index 71a5675025348326cf831dae54667a09d1e1999c..08cd1a4f5c04e1eeca3ba41c812a008d93f2f8f9 100644 (file)
@@ -8,8 +8,7 @@
 
 package org.opendaylight.openflowjava.protocol.impl.deserialization;
 
-import junit.framework.Assert;
-
+import org.junit.Assert;
 import org.junit.Test;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.impl.util.TypeToClassKey;
index 0c7b291171100dc671cd9633651dc5a5b021722f..f1da495aaee46d495570769340a7b076df58af57 100644 (file)
@@ -10,8 +10,7 @@ package org.opendaylight.openflowjava.protocol.impl.serialization.factories;
 
 import io.netty.buffer.ByteBuf;
 import io.netty.buffer.UnpooledByteBufAllocator;
-import junit.framework.Assert;
-
+import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.opendaylight.openflowjava.protocol.api.extensibility.MessageTypeKey;
index 8dfa955422adc1ae71321d9fcb7f6c77fac0290f..7ac417a4a54f4ea236a3cf1272d67af87c1c2e1f 100644 (file)
@@ -14,8 +14,7 @@ import io.netty.buffer.UnpooledByteBufAllocator;
 import java.util.ArrayList;
 import java.util.List;
 
-import junit.framework.Assert;
-
+import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.opendaylight.openflowjava.protocol.api.extensibility.MessageTypeKey;
index d03f7983f70796372ff3b30fcfe4ec05992da51c..b64d6c5cdefbaef933eac9ef976d9fe10d1c14fc 100644 (file)
@@ -10,8 +10,7 @@ package org.opendaylight.openflowjava.protocol.impl.serialization.factories;
 
 import io.netty.buffer.ByteBuf;
 import io.netty.buffer.UnpooledByteBufAllocator;
-import junit.framework.Assert;
-
+import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.opendaylight.openflowjava.protocol.api.extensibility.MessageTypeKey;
index cc2a7576096c54d3c21ee5f1b6aab1d20f878ebe..c8a41d2cf694080404521693da9421069010e465 100644 (file)
@@ -10,8 +10,7 @@ package org.opendaylight.openflowjava.protocol.impl.serialization.factories;
 
 import io.netty.buffer.ByteBuf;
 import io.netty.buffer.UnpooledByteBufAllocator;
-import junit.framework.Assert;
-
+import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.opendaylight.openflowjava.protocol.api.extensibility.MessageTypeKey;
index 8b5f8bfaa0bda83a8cabcdd049d0d29f62325e95..ce2265352d48cfe79c1f8d53e267272a876e3a82 100644 (file)
@@ -10,8 +10,7 @@ package org.opendaylight.openflowjava.protocol.impl.serialization.factories;
 
 import io.netty.buffer.ByteBuf;
 import io.netty.buffer.UnpooledByteBufAllocator;
-import junit.framework.Assert;
-
+import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.opendaylight.openflowjava.protocol.api.extensibility.MessageTypeKey;
index 981a8901ee10a4681571ffe526a3392518c2bbd2..a67b2a4858c4ba94d9bcfd5724e0172a18cff90a 100644 (file)
@@ -13,8 +13,7 @@ import io.netty.buffer.UnpooledByteBufAllocator;
 
 import java.math.BigInteger;
 
-import junit.framework.Assert;
-
+import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.opendaylight.openflowjava.protocol.api.extensibility.MessageTypeKey;
index 823ed68664315ba2c8ced48799ef75f6f64bead0..d547f064285c8509c0899b7f26c89a7df456b02b 100644 (file)
@@ -10,8 +10,7 @@ package org.opendaylight.openflowjava.protocol.impl.serialization.factories;
 
 import io.netty.buffer.ByteBuf;
 import io.netty.buffer.UnpooledByteBufAllocator;
-import junit.framework.Assert;
-
+import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.opendaylight.openflowjava.protocol.api.extensibility.MessageTypeKey;
index c6f566cb36f6c4cc89b68f44e71a6a4296af5233..ca295ea183dcb03f1457c16af6bc067520aba8b3 100644 (file)
@@ -10,8 +10,7 @@ package org.opendaylight.openflowjava.protocol.impl.util;
 
 import io.netty.buffer.ByteBuf;
 import io.netty.buffer.UnpooledByteBufAllocator;
-import junit.framework.Assert;
-
+import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.opendaylight.openflowjava.protocol.api.extensibility.MessageTypeKey;
diff --git a/pom.xml b/pom.xml
index b54ddd5952a4aac1705b1e1d0f0a0202b19a770b..71becad68b399a91a01f9e05cd650a28f0ff18a3 100644 (file)
--- a/pom.xml
+++ b/pom.xml
             <dependency>
                 <groupId>junit</groupId>
                 <artifactId>junit</artifactId>
-                <version>4.10</version>
+                <version>${junit.version}</version>
                 <scope>test</scope>
                 <optional>true</optional>
             </dependency>