Move adsal into its own subdirectory.
[controller.git] / opendaylight / adsal / northbound / flowprogrammer / src / test / java / org / opendaylight / controller / flowprogrammer / northbound / FlowProgrammerNorthboundTest.java
diff --git a/opendaylight/adsal/northbound/flowprogrammer/src/test/java/org/opendaylight/controller/flowprogrammer/northbound/FlowProgrammerNorthboundTest.java b/opendaylight/adsal/northbound/flowprogrammer/src/test/java/org/opendaylight/controller/flowprogrammer/northbound/FlowProgrammerNorthboundTest.java
new file mode 100644 (file)
index 0000000..10767e8
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2014 Cisco Systems, Inc. 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.controller.flowprogrammer.northbound;
+
+import java.util.ArrayList;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.opendaylight.controller.forwardingrulesmanager.FlowConfig;
+
+public class FlowProgrammerNorthboundTest {
+
+    @Test
+    public void testFlowConfigs() {
+        FlowConfigs fc = new FlowConfigs(null);
+        Assert.assertNull(fc.getFlowConfig());
+
+        FlowConfig conf = new FlowConfig();
+        FlowConfig conf2 = new FlowConfig();
+        ArrayList<FlowConfig> list = new ArrayList<FlowConfig>();
+
+        list.add(conf);
+        list.add(conf2);
+        FlowConfigs fc2 = new FlowConfigs(list);
+        Assert.assertTrue(fc2.getFlowConfig().equals(list));
+
+        fc.setFlowConfig(list);
+        Assert.assertTrue(fc.getFlowConfig().equals(fc2.getFlowConfig()));
+
+        fc.setFlowConfig(null);
+        Assert.assertNull(fc.getFlowConfig());
+
+    }
+
+}