--- /dev/null
+/*
+ * Copyright (C) 2015 IBM, Inc.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+
+package org.opendaylight.neutron.spi;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+import org.opendaylight.neutron.spi.JaxbTestHelper;
+import org.opendaylight.neutron.spi.NeutronNetwork_Segment;
+
+public class NeutronNetwork_SegmentJAXBTest {
+
+ private static final String NeutronNetwork_Segment_sourceJson = "{ "
+ + "\"provider:network_type\": \"vlan\", "
+ + "\"provider:physical_network\": \"physnet1\", "
+ + "\"provider:segmentation_id\": \"1001\" }";
+
+ @Test
+ public void test_NeutronNetwork_Segment_JAXB() {
+ NeutronNetwork_Segment segmentObject = new NeutronNetwork_Segment();
+ try {
+ NeutronNetwork_Segment testObject = (NeutronNetwork_Segment) JaxbTestHelper.jaxbUnmarshall(segmentObject,
+ NeutronNetwork_Segment_sourceJson);
+
+ Assert.assertEquals("NeutronNetwork_Segment JAXB Test 1: Testing provider:network_type failed", "vlan",
+ testObject.getProviderNetworkType());
+
+ Assert.assertEquals("NeutronNetwork_Segment JAXB Test 2: Testing provider:physical_network failed",
+ "physnet1", testObject.getProviderPhysicalNetwork());
+
+ Assert.assertEquals("NeutronNetwork_Segment JAXB Test 3: Testing provider:segmentation_id failed", "1001",
+ testObject.getProviderSegmentationID());
+
+ } catch (Exception e) {
+ Assert.fail("Test failed");
+ }
+ }
+
+}
--- /dev/null
+/*
+ * Copyright (C) 2015 IBM, Inc.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+
+package org.opendaylight.neutron.spi;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+import org.opendaylight.neutron.spi.JaxbTestHelper;
+import org.opendaylight.neutron.spi.Neutron_ID;
+
+public class Neutron_IDJAXBTest {
+
+ private static final String Neutron_ID_sourceJson = "{ " +
+
+ "\"id\": \"4e8e5957-649f-477b-9e5b-f1f75b21c03c\" }";
+
+ @Test
+ public void test_Neutron_ID_JAXB() {
+ Neutron_ID neutronObject = new Neutron_ID();
+ try {
+ Neutron_ID testObject = (Neutron_ID) JaxbTestHelper.jaxbUnmarshall(neutronObject, Neutron_ID_sourceJson);
+
+ Assert.assertEquals("Neutron_ID JAXB Test 1: Testing id failed", "4e8e5957-649f-477b-9e5b-f1f75b21c03c",
+ testObject.getID());
+
+ } catch (Exception e) {
+ Assert.fail("Test failed");
+ }
+ }
+
+}
--- /dev/null
+/*
+ * Copyright (C) 2015 IBM, Inc.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+
+package org.opendaylight.neutron.spi;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+import org.opendaylight.neutron.spi.JaxbTestHelper;
+import org.opendaylight.neutron.spi.Neutron_IPs;
+
+public class Neutron_IPsJAXBTest {
+
+ private static final String Neutron_IPs_sourceJson = "{ " +
+
+ "\"ip_address\": \"192.168.111.3\", " + "\"subnet_id\": \"22b44fc2-4ffb-4de4-b0f9-69d58b37ae27\" }";
+
+ @Test
+ public void test_Neutron_IPs_JAXB() {
+ Neutron_IPs neutronObject = new Neutron_IPs();
+ try {
+ Neutron_IPs testObject = (Neutron_IPs) JaxbTestHelper.jaxbUnmarshall(neutronObject, Neutron_IPs_sourceJson);
+
+ Assert.assertEquals("Neutron_IPs JAXB Test 1: Testing ip_address failed", "192.168.111.3",
+ testObject.getIpAddress());
+
+ Assert.assertEquals("Neutron_IPs JAXB Test 2: Testing subnet_id failed",
+ "22b44fc2-4ffb-4de4-b0f9-69d58b37ae27", testObject.getSubnetUUID());
+
+ } catch (Exception e) {
+ Assert.fail("Test failed");
+ }
+ }
+
+}