2 * Copyright (c) 2015 Tata Consultancy Services. 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
9 package org.opendaylight.neutron.spi;
11 import org.junit.Assert;
12 import org.junit.Test;
14 import org.opendaylight.neutron.spi.JaxbTestHelper;
15 import org.opendaylight.neutron.spi.Neutron_IPs;
17 public class Neutron_IPsJAXBTest {
19 private static final String Neutron_IPs_sourceJson = "{ " +
21 "\"ip_address\": \"192.168.111.3\", " + "\"subnet_id\": \"22b44fc2-4ffb-4de4-b0f9-69d58b37ae27\" }";
24 public void test_Neutron_IPs_JAXB() {
25 Neutron_IPs neutronObject = new Neutron_IPs();
27 Neutron_IPs testObject = (Neutron_IPs) JaxbTestHelper.jaxbUnmarshall(neutronObject, Neutron_IPs_sourceJson);
29 Assert.assertEquals("Neutron_IPs JAXB Test 1: Testing ip_address failed", "192.168.111.3",
30 testObject.getIpAddress());
32 Assert.assertEquals("Neutron_IPs JAXB Test 2: Testing subnet_id failed",
33 "22b44fc2-4ffb-4de4-b0f9-69d58b37ae27", testObject.getSubnetUUID());
35 } catch (Exception e) {
36 Assert.fail("Test failed");