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.NeutronVPNLifetime;
16 public class NeutronVPNLifetimeJAXBTest {
18 private static final String NeutronVPNLifetimeTest_sourceJson = "{" +
19 "\"units\": \"seconds\", " +
23 public void test_NeutronVPNLifetime_JAXB() {
24 NeutronVPNLifetime dummyObject = new NeutronVPNLifetime();
26 NeutronVPNLifetime testObject = (NeutronVPNLifetime) JaxbTestHelper.jaxbUnmarshall(dummyObject, NeutronVPNLifetimeTest_sourceJson);
27 Assert.assertEquals("NeutronVPNLifetime JAXB Test 1: Testing units failed",
28 "seconds", testObject.getUnits());
30 Assert.assertEquals("NeutronVPNLifetime JAXB Test 2: Testing value failed",
31 new Integer(3600), testObject.getValue());
32 } catch (Exception e) {
33 Assert.fail("Tests failed");