2 * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.controller.flowprogrammer.northbound;
10 import java.util.ArrayList;
12 import org.junit.Assert;
13 import org.junit.Test;
14 import org.opendaylight.controller.forwardingrulesmanager.FlowConfig;
16 public class FlowProgrammerNorthboundTest {
19 public void testFlowConfigs() {
20 FlowConfigs fc = new FlowConfigs(null);
21 Assert.assertNull(fc.getFlowConfig());
23 FlowConfig conf = new FlowConfig();
24 FlowConfig conf2 = new FlowConfig();
25 ArrayList<FlowConfig> list = new ArrayList<FlowConfig>();
29 FlowConfigs fc2 = new FlowConfigs(list);
30 Assert.assertTrue(fc2.getFlowConfig().equals(list));
32 fc.setFlowConfig(list);
33 Assert.assertTrue(fc.getFlowConfig().equals(fc2.getFlowConfig()));
35 fc.setFlowConfig(null);
36 Assert.assertNull(fc.getFlowConfig());