Refactored IT's to remove dependency on com.google.code.gson.internal.Pair 77/4277/1
authorDave Tucker <dave@dtucker.co.uk>
Wed, 15 Jan 2014 18:59:46 +0000 (18:59 +0000)
committerDave Tucker <dave@dtucker.co.uk>
Wed, 15 Jan 2014 18:59:46 +0000 (18:59 +0000)
Renamed IT's to fix typos and keep case consistent

Change-Id: I97bf39df8a8a6b127309a495e1a8b58cba92d291
Signed-off-by: Dave Tucker <dave.j.tucker@hp.com>
ovsdb/src/test/java/org/opendaylight/ovsdb/plugin/OvsdbTestAddBridgeIT.java
ovsdb/src/test/java/org/opendaylight/ovsdb/plugin/OvsdbTestAddPortIT.java
ovsdb/src/test/java/org/opendaylight/ovsdb/plugin/OvsdbTestAddTunnelIT.java
ovsdb/src/test/java/org/opendaylight/ovsdb/plugin/OvsdbTestAddVlanIT.java
ovsdb/src/test/java/org/opendaylight/ovsdb/plugin/OvsdbTestBase.java
ovsdb/src/test/java/org/opendaylight/ovsdb/plugin/OvsdbTestBridgeConfigIT.java
ovsdb/src/test/java/org/opendaylight/ovsdb/plugin/OvsdbTestGetBridgeDomainsIT.java [moved from ovsdb/src/test/java/org/opendaylight/ovsdb/plugin/OVSDBTestGetBridgeDomainsIT.java with 75% similarity]
ovsdb/src/test/java/org/opendaylight/ovsdb/plugin/OvsdbTestSetManagerIT.java
ovsdb/src/test/java/org/opendaylight/ovsdb/plugin/OvsdbTestSetOFControllerIT.java [moved from ovsdb/src/test/java/org/opendaylight/ovsdb/plugin/OvsdbTestSetOFControlerIT.java with 78% similarity]

index f8edd48d7ac1acbf5ed0cfdfd551d2f21e29ffe5..f58b19b41df6d4c62546f24f29ea0d9441486123 100644 (file)
@@ -1,12 +1,12 @@
-/*
- * [[ Authors will Fill in the Copyright header ]]
- *
- * 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
- *
- * Authors : Brent Salisbury, Hugo Trippaers
- */
+/*\r
+ * [[ Authors will Fill in the Copyright header ]]\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
+ * Authors : Brent Salisbury, Hugo Trippaers\r
+ */\r
 package org.opendaylight.ovsdb.plugin;\r
 \r
 import org.junit.Test;\r
@@ -14,8 +14,6 @@ import org.opendaylight.controller.sal.core.Node;
 import org.slf4j.Logger;\r
 import org.slf4j.LoggerFactory;\r
 \r
-import com.google.gson.internal.Pair;\r
-\r
 public class OvsdbTestAddBridgeIT extends OvsdbTestBase {\r
     private static final Logger logger = LoggerFactory\r
             .getLogger(OvsdbTestAddBridgeIT.class);\r
@@ -23,9 +21,9 @@ public class OvsdbTestAddBridgeIT extends OvsdbTestBase {
     @Test\r
     public void addBridge() throws Throwable{\r
 \r
-        Pair<ConnectionService, Node> connection = getTestConnection();\r
-        ConnectionService connectionService = connection.first;\r
-        Node node = connection.second;\r
+        TestObjects testObjects = getTestConnection();\r
+        ConnectionService connectionService = testObjects.connectionService;\r
+        Node node = testObjects.node;\r
 \r
         /**\r
          * Create a Bridge Domain\r
index c632c12bdbbb26863d3c968eaa75f5be8f9d4d41..adafe4c5c9a452b0449cbc2a675b281aa601550d 100644 (file)
@@ -18,8 +18,6 @@ import org.opendaylight.controller.sal.core.Node;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.google.gson.internal.Pair;
-
 public class OvsdbTestAddPortIT extends OvsdbTestBase {
     private static final Logger logger = LoggerFactory
             .getLogger(OvsdbTestAddPortIT.class);
@@ -32,9 +30,9 @@ public class OvsdbTestAddPortIT extends OvsdbTestBase {
 
     @Test
     public void addPort() throws Throwable{
-        Pair<ConnectionService, Node> connection = getTestConnection();
-        ConnectionService connectionService = connection.first;
-        Node node = connection.second;
+        TestObjects testObjects = getTestConnection();
+        ConnectionService connectionService = testObjects.connectionService;
+        Node node = testObjects.node;
 
         /**
          * Create a Port and attach it to a Bridge
index 125a639b22717641dadecf516d95f605c2bf9ce0..0c38f31cc5c1d0d09bf59c9f71936afef194be58 100644 (file)
@@ -19,17 +19,15 @@ import org.opendaylight.controller.sal.networkconfig.bridgedomain.ConfigConstant
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.google.gson.internal.Pair;
-
 public class OvsdbTestAddTunnelIT extends OvsdbTestBase {
     private static final Logger logger = LoggerFactory
             .getLogger(OvsdbTestAddTunnelIT.class);
 
     @Test
     public void addTunnel() throws Throwable{
-        Pair<ConnectionService, Node> connection = getTestConnection();
-        ConnectionService connectionService = connection.first;
-        Node node = connection.second;
+        TestObjects testObjects = getTestConnection();
+        ConnectionService connectionService = testObjects.connectionService;
+        Node node = testObjects.node;
 
         /**
          * tunnelendpoint IP address of the
index a5948e9076b2b357bb83195e8f18861e04a10dce..ee66acde9278b4e47661c51deec83acd7480468f 100644 (file)
@@ -18,17 +18,15 @@ import org.opendaylight.controller.sal.networkconfig.bridgedomain.ConfigConstant
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.google.gson.internal.Pair;
-
 public class OvsdbTestAddVlanIT extends OvsdbTestBase {
     private static final Logger logger = LoggerFactory
             .getLogger(OvsdbTestAddVlanIT.class);
 
     @Test
     public void addPortVlan() throws Throwable{
-        Pair<ConnectionService, Node> connection = getTestConnection();
-        ConnectionService connectionService = connection.first;
-        Node node = connection.second;
+        TestObjects testObjects = getTestConnection();
+        ConnectionService connectionService = testObjects.connectionService;
+        Node node = testObjects.node;
 
         int vlanid = 100;
 
index 1c469d931533173971e991af14df8c801d25623a..f6929b335759323a3f69c915ab4405d16f80ce10 100644 (file)
@@ -19,8 +19,6 @@ import org.opendaylight.controller.sal.connection.ConnectionConstants;
 import org.opendaylight.controller.sal.core.Node;
 import org.opendaylight.controller.sal.core.NodeConnector;
 
-import com.google.gson.internal.Pair;
-
 public abstract class OvsdbTestBase {
     private final static String identifier = "TEST";
 
@@ -39,7 +37,17 @@ public abstract class OvsdbTestBase {
         return props;
     }
 
-    public Pair<ConnectionService, Node> getTestConnection() throws IOException {
+    public class TestObjects {
+        public final ConnectionService connectionService;
+        public final Node node;
+
+        public TestObjects(ConnectionService connectionService, Node node) {
+            this.connectionService = connectionService;
+            this.node = node;
+        }
+    }
+
+    public TestObjects getTestConnection() throws IOException {
         Node.NodeIDType.registerIDType("OVS", String.class);
         NodeConnector.NodeConnectorIDType.registerIDType("OVS", String.class,
                 "OVS");
@@ -57,7 +65,7 @@ public abstract class OvsdbTestBase {
         if (node == null) {
             throw new IOException("Failed to connecto to ovsdb server");
         }
-        return new Pair<ConnectionService, Node>(connectionService, node);
+        return new TestObjects(connectionService, node);
     }
 
 }
index 59490368670ff47adc4eb7ba1ff70c2bac877cef..bc0eb13603871d7bbb81de9f1eac673608393a1d 100644 (file)
@@ -18,17 +18,15 @@ import org.opendaylight.controller.sal.networkconfig.bridgedomain.ConfigConstant
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.google.gson.internal.Pair;
-
 public class OvsdbTestBridgeConfigIT extends OvsdbTestBase {
     private static final Logger logger = LoggerFactory
             .getLogger(OvsdbTestSetManagerIT.class);
 
     @Test
     public void setBridgeConfig() throws Throwable{
-        Pair<ConnectionService, Node> connection = getTestConnection();
-        ConnectionService connectionService = connection.first;
-        Node node = connection.second;
+        TestObjects testObjects = getTestConnection();
+        ConnectionService connectionService = testObjects.connectionService;
+        Node node = testObjects.node;
 
         Map<ConfigConstants, Object> configs = new HashMap<ConfigConstants, Object>();
 
similarity index 75%
rename from ovsdb/src/test/java/org/opendaylight/ovsdb/plugin/OVSDBTestGetBridgeDomainsIT.java
rename to ovsdb/src/test/java/org/opendaylight/ovsdb/plugin/OvsdbTestGetBridgeDomainsIT.java
index ba4fd6ce937753f511ad9a964364a6c530d30dfa..de1e370ff198d5ec25fd960f680fdf789ba62c5c 100644 (file)
@@ -16,18 +16,16 @@ import org.opendaylight.controller.sal.core.Node;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.google.gson.internal.Pair;
-
-public class OVSDBTestGetBridgeDomainsIT extends OvsdbTestBase {
+public class OvsdbTestGetBridgeDomainsIT extends OvsdbTestBase {
     private static final Logger logger = LoggerFactory
-            .getLogger(OVSDBTestGetBridgeDomainsIT.class);
+            .getLogger(OvsdbTestGetBridgeDomainsIT.class);
 
     @Test
     public void getBridgeDomains() throws Throwable{
 
-        Pair<ConnectionService, Node> connection = getTestConnection();
-        ConnectionService connectionService = connection.first;
-        Node node = connection.second;
+        TestObjects testObjects = getTestConnection();
+        ConnectionService connectionService = testObjects.connectionService;
+        Node node = testObjects.node;
 
         /**
          * List a Bridge Domain
index f0db13da7befbf82c895de60255d5297dca0eba2..cdff94ef81daeb41d253e0c85048b6197fb4fedd 100644 (file)
@@ -1,12 +1,12 @@
-/*
- * [[ Authors will Fill in the Copyright header ]]
- *
- * 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
- *
- * Authors : Brent Salisbury, Hugo Trippaers
- */
+/*\r
+ * [[ Authors will Fill in the Copyright header ]]\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
+ * Authors : Brent Salisbury, Hugo Trippaers\r
+ */\r
 package org.opendaylight.ovsdb.plugin;\r
 \r
 import org.junit.Test;\r
@@ -14,17 +14,15 @@ import org.opendaylight.controller.sal.core.Node;
 import org.slf4j.Logger;\r
 import org.slf4j.LoggerFactory;\r
 \r
-import com.google.gson.internal.Pair;\r
-\r
 public class OvsdbTestSetManagerIT extends OvsdbTestBase {\r
     private static final Logger logger = LoggerFactory\r
             .getLogger(OvsdbTestSetManagerIT.class);\r
 \r
     @Test\r
     public void setManager() throws Throwable{\r
-        Pair<ConnectionService, Node> connection = getTestConnection();\r
-        ConnectionService connectionService = connection.first;\r
-        Node node = connection.second;\r
+        TestObjects testObjects = getTestConnection();\r
+        ConnectionService connectionService = testObjects.connectionService;\r
+        Node node = testObjects.node;\r
 \r
         /**\r
          * Implements the OVS Connection for Managers\r
similarity index 78%
rename from ovsdb/src/test/java/org/opendaylight/ovsdb/plugin/OvsdbTestSetOFControlerIT.java
rename to ovsdb/src/test/java/org/opendaylight/ovsdb/plugin/OvsdbTestSetOFControllerIT.java
index b0e3191fda505322017505e50f6627438b61e2aa..763414d53c5a6683cb81a50f46a45d66c6c160bb 100644 (file)
@@ -18,17 +18,15 @@ import org.opendaylight.controller.sal.networkconfig.bridgedomain.ConfigConstant
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.google.gson.internal.Pair;
-
-public class OvsdbTestSetOFControlerIT extends OvsdbTestBase {
+public class OvsdbTestSetOFControllerIT extends OvsdbTestBase {
     private static final Logger logger = LoggerFactory
-            .getLogger(OvsdbTestSetOFControlerIT.class);
+            .getLogger(OvsdbTestSetOFControllerIT.class);
 
     @Test
     public void setController() throws Throwable{
-        Pair<ConnectionService, Node> connection = getTestConnection();
-        ConnectionService connectionService = connection.first;
-        Node node = connection.second;
+        TestObjects testObjects = getTestConnection();
+        ConnectionService connectionService = testObjects.connectionService;
+        Node node = testObjects.node;
 
         Map<ConfigConstants, Object> configs = new HashMap<ConfigConstants, Object>();
         configs.put(ConfigConstants.DEST_IP, "192.168.254.1");