BUG 2302 : odl-clustering-test-app should not be part of the odl-restconf-all feature set
[controller.git] / opendaylight / adsal / northbound / subnets / src / test / java / org / opendaylight / controller / subnets / northbound / SubnetsNorthboundTest.java
1 /*
2  * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.controller.subnets.northbound;
9
10 import java.util.ArrayList;
11
12 import org.junit.Assert;
13 import org.junit.Test;
14 import org.opendaylight.controller.switchmanager.SubnetConfig;
15
16 public class SubnetsNorthboundTest {
17
18     @Test
19     public void testSubnetConfigs() {
20         SubnetConfigs sc1 = new SubnetConfigs(null);
21         Assert.assertNull(sc1.getSubnetConfig());
22
23         ArrayList<SubnetConfig> list = new ArrayList<SubnetConfig>();
24         SubnetConfig s1 = new SubnetConfig();
25         list.add(s1);
26         sc1.setSubnetConfig(list);
27         Assert.assertTrue(sc1.getSubnetConfig().equals(list));
28
29         sc1.setSubnetConfig(null);
30         Assert.assertNull(sc1.getSubnetConfig());
31     }
32
33 }