checkstyle: JavadocStyleCheck
[neutron.git] / neutron-spi / src / test / java / org / opendaylight / neutron / spi / Neutron_IPsJAXBTest.java
1 /*
2  * Copyright (c) 2015 Tata Consultancy Services.  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
9 package org.opendaylight.neutron.spi;
10
11 import javax.xml.bind.JAXBException;
12 import org.junit.Assert;
13 import org.junit.Test;
14
15 public class Neutron_IPsJAXBTest {
16
17     private static final String NEUTRON_IPS_SOURCE_JSON =
18             "{ \"ip_address\": \"192.168.111.3\", " + "\"subnet_id\": \"22b44fc2-4ffb-4de4-b0f9-69d58b37ae27\" }";
19
20     @Test
21     public void test_Neutron_IPs_JAXB() throws JAXBException {
22         Neutron_IPs neutronObject = new Neutron_IPs();
23         Neutron_IPs testObject = (Neutron_IPs) JaxbTestHelper.jaxbUnmarshall(neutronObject, NEUTRON_IPS_SOURCE_JSON);
24
25         Assert.assertEquals("Neutron_IPs JAXB Test 1: Testing ip_address failed", "192.168.111.3",
26                     testObject.getIpAddress());
27
28         Assert.assertEquals("Neutron_IPs JAXB Test 2: Testing subnet_id failed",
29                     "22b44fc2-4ffb-4de4-b0f9-69d58b37ae27", testObject.getSubnetUUID());
30     }
31 }