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