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 javax.xml.bind.JAXBException;
12 import org.junit.Assert;
13 import org.junit.Test;
15 public class NeutronPort_AllowedAddressPairsJAXBTest {
17 private static final String NEUTRON_PORT_ALLOWED_ADDRESS_PAIRS_SOURCE_JSON = "{ "
18 + "\"ip_address\": \"192.168.199.1\", " + "\"mac_address\": \"fa:16:3e:c9:cb:f0\" }";
21 public void test_NeutronPort_AllowedAddressPairs_JAXB() throws JAXBException {
22 NeutronPort_AllowedAddressPairs portObject = new NeutronPort_AllowedAddressPairs();
24 NeutronPort_AllowedAddressPairs testObject = (NeutronPort_AllowedAddressPairs) JaxbTestHelper
25 .jaxbUnmarshall(portObject, NEUTRON_PORT_ALLOWED_ADDRESS_PAIRS_SOURCE_JSON);
26 Assert.assertEquals("NeutronPort Allowed Address Pairs JAXB Test 1: Testing ip_address failed",
27 "192.168.199.1", testObject.getIpAddress());
29 Assert.assertEquals("NeutronPort Allowed Address Pairs JAXB Test 10: Testing mac_address failed",
30 "fa:16:3e:c9:cb:f0", testObject.getMacAddress());