Upgrade ietf-{inet,yang}-types to 2013-07-15
[bgpcep.git] / bgp / parser-impl / src / test / java / org / opendaylight / protocol / bgp / parser / impl / IPv4NextHopTest.java
1 /*
2  * Copyright (c) 2013 Cisco 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.protocol.bgp.parser.impl;
9
10 import static org.junit.Assert.assertEquals;
11
12 import org.junit.Before;
13 import org.junit.Test;
14 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Address;
15 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.next.hop.c.next.hop.ipv4.next.hop._case.Ipv4NextHop;
16 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.next.hop.c.next.hop.ipv4.next.hop._case.Ipv4NextHopBuilder;
17
18 public class IPv4NextHopTest {
19
20     private Ipv4NextHop nextHop;
21
22     @Before
23     public void init() {
24         this.nextHop = new Ipv4NextHopBuilder().setGlobal(new Ipv4Address("10.0.0.1")).build();
25     }
26
27     @Test
28     public void testGetGlobal() {
29         final Ipv4Address address = new Ipv4Address("10.0.0.1");
30         assertEquals(address, this.nextHop.getGlobal());
31     }
32 }