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.subnets.northbound;
10 import java.util.ArrayList;
12 import org.junit.Assert;
13 import org.junit.Test;
14 import org.opendaylight.controller.switchmanager.SubnetConfig;
16 public class SubnetsNorthboundTest {
19 public void testSubnetConfigs() {
20 SubnetConfigs sc1 = new SubnetConfigs(null);
21 Assert.assertNull(sc1.getSubnetConfig());
23 ArrayList<SubnetConfig> list = new ArrayList<SubnetConfig>();
24 SubnetConfig s1 = new SubnetConfig();
26 sc1.setSubnetConfig(list);
27 Assert.assertTrue(sc1.getSubnetConfig().equals(list));
29 sc1.setSubnetConfig(null);
30 Assert.assertNull(sc1.getSubnetConfig());