2 * Copyright (c) 2016 Brocade Communications Systems, Inc. and others. 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
8 package org.opendaylight.neutron.spi;
10 import javax.xml.bind.JAXBException;
11 import org.junit.Assert;
12 import org.junit.Test;
15 * Created by Anil Vishnoi (avishnoi@Brocade.com)
17 public class NeutronSFCPortPairGroupJAXBTest {
18 private static final String NeutronSFCPortPairGroup_sourceJson = "{ " + "\"name\": \"portpair1\", "
19 + "\"port_pairs\": [ " + "\"d11e9190-73d4-11e5-b392-2c27d72acb4c\"" + "], "
20 + "\"tenant_id\": \"4969c491a3c74ee4af974e6d800c62de\", "
21 + "\"id\": \"4e8e5957-649f-477b-9e5b-f1f75b21c03c\" }";
24 public void test_NeutronSFCPortPairGroup_JAXB() throws JAXBException {
25 NeutronSFCPortPairGroup testObject = new NeutronSFCPortPairGroup();
26 NeutronSFCPortPairGroup neutronObject = (NeutronSFCPortPairGroup) JaxbTestHelper.jaxbUnmarshall(testObject,
27 NeutronSFCPortPairGroup_sourceJson);
29 Assert.assertEquals("NeutronSFCPortPairGroup JAXB Test 1: Testing id failed",
30 "4e8e5957-649f-477b-9e5b-f1f75b21c03c", neutronObject.getID());
32 Assert.assertEquals("NeutronSFCPortPairGroup JAXB Test 2: Testing tenant_id failed",
33 "4969c491a3c74ee4af974e6d800c62de", neutronObject.getTenantID());
35 Assert.assertEquals("NeutronSFCPortPairGroup JAXB Test 3: Testing port_pairs failed",
36 "d11e9190-73d4-11e5-b392-2c27d72acb4c", neutronObject.getPortPairs().get(0));