Checkstyle formatting issues fix (SPI)
[neutron.git] / neutron-spi / src / test / java / org / opendaylight / neutron / spi / NeutronSFCPortPairGroupJAXBTest.java
1 /*
2  * Copyright (c) 2016 Brocade Communications Systems, Inc. and others.  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 package org.opendaylight.neutron.spi;
9
10 import javax.xml.bind.JAXBException;
11 import org.junit.Assert;
12 import org.junit.Test;
13
14 /**
15  * Created by Anil Vishnoi (avishnoi@Brocade.com)
16  */
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\" }";
22
23     @Test
24     public void test_NeutronSFCPortPairGroup_JAXB() throws JAXBException {
25         NeutronSFCPortPairGroup testObject = new NeutronSFCPortPairGroup();
26         NeutronSFCPortPairGroup neutronObject = (NeutronSFCPortPairGroup) JaxbTestHelper.jaxbUnmarshall(testObject,
27                 NeutronSFCPortPairGroup_sourceJson);
28
29         Assert.assertEquals("NeutronSFCPortPairGroup JAXB Test 1: Testing id failed",
30                 "4e8e5957-649f-477b-9e5b-f1f75b21c03c", neutronObject.getID());
31
32         Assert.assertEquals("NeutronSFCPortPairGroup JAXB Test 2: Testing tenant_id failed",
33                 "4969c491a3c74ee4af974e6d800c62de", neutronObject.getTenantID());
34
35         Assert.assertEquals("NeutronSFCPortPairGroup JAXB Test 3: Testing port_pairs failed",
36                 "d11e9190-73d4-11e5-b392-2c27d72acb4c", neutronObject.getPortPairs().get(0));
37     }
38 }