Search in sources :

Example 1 with SimpleAddress

use of org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.SimpleAddress in project lispflowmapping by opendaylight.

the class LispSimpleAddressStringifierTest method getStringTest_asIpv4.

/**
 * Tests {@link LispSimpleAddressStringifier#getString} with Ipv4Address.
 */
@Test
public void getStringTest_asIpv4() {
    SimpleAddress simpleAddress = new SimpleAddress(IP_ADDRESS_USING_IPV4);
    String result = LispSimpleAddressStringifier.getString(simpleAddress);
    assertEquals(IPV4_ADDRESS_STRING, result);
}
Also used : SimpleAddress(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.SimpleAddress) Test(org.junit.Test)

Example 2 with SimpleAddress

use of org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.SimpleAddress in project lispflowmapping by opendaylight.

the class LispSimpleAddressStringifierTest method getStringTest_asMac.

/**
 * Tests {@link LispSimpleAddressStringifier#getString} with MacAddress.
 */
@Test
public void getStringTest_asMac() {
    SimpleAddress simpleAddress = new SimpleAddress(MAC_ADDRESS);
    String result = LispSimpleAddressStringifier.getString(simpleAddress);
    assertEquals(MAC_ADDRESS_STRING, result);
}
Also used : SimpleAddress(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.SimpleAddress) Test(org.junit.Test)

Example 3 with SimpleAddress

use of org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.SimpleAddress in project lispflowmapping by opendaylight.

the class LispSimpleAddressStringifierTest method getStringTest_asIpv4Prefix.

/**
 * Tests {@link LispSimpleAddressStringifier#getString} with Ipv4Prefix.
 */
@Test
public void getStringTest_asIpv4Prefix() {
    SimpleAddress simpleAddress = new SimpleAddress(IPV4_PREFIX);
    String result = LispSimpleAddressStringifier.getString(simpleAddress);
    assertEquals(IPV4_PREFIX.getIpv4Prefix().getValue(), result);
}
Also used : SimpleAddress(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.SimpleAddress) Test(org.junit.Test)

Example 4 with SimpleAddress

use of org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.SimpleAddress in project lispflowmapping by opendaylight.

the class LispSimpleAddressStringifierTest method getStringTest_asDistinguishedName.

/**
 * Tests {@link LispSimpleAddressStringifier#getString} with DistinguishedName.
 */
@Test
public void getStringTest_asDistinguishedName() {
    DistinguishedName distinguishedNameMock = Mockito.mock(DistinguishedName.class);
    Mockito.when(distinguishedNameMock.getDistinguishedName()).thenReturn(DISTINGUISHED_NAME);
    SimpleAddress simpleAddress = new SimpleAddress(distinguishedNameMock.getDistinguishedName());
    assertEquals(DISTINGUISHED_NAME.getValue(), LispSimpleAddressStringifier.getString(simpleAddress));
}
Also used : DistinguishedName(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address.address.DistinguishedName) SimpleAddress(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.SimpleAddress) Test(org.junit.Test)

Example 5 with SimpleAddress

use of org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.SimpleAddress in project lispflowmapping by opendaylight.

the class LispSimpleAddressStringifierTest method getStringTest_asIpv6.

/**
 * Tests {@link LispSimpleAddressStringifier#getString} with Ipv6Address.
 */
@Test
public void getStringTest_asIpv6() {
    SimpleAddress simpleAddress = new SimpleAddress(IP_ADDRESS_USING_IPV6);
    String result = LispSimpleAddressStringifier.getString(simpleAddress);
    assertEquals(IPV6_ADDRESS_STRING, result);
}
Also used : SimpleAddress(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.SimpleAddress) Test(org.junit.Test)

Aggregations

SimpleAddress (org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.SimpleAddress)46 Test (org.junit.Test)29 IpAddress (org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress)16 Ipv4Address (org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Address)14 Eid (org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.eid.container.Eid)13 Rloc (org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.rloc.container.Rloc)11 EidBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.eid.container.EidBuilder)9 InetAddress (java.net.InetAddress)8 KeyValueAddress (org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address.address.KeyValueAddress)8 MacAddress (org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress)8 GotMapReply (org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.GotMapReply)7 MapReply (org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.MapReply)7 ArrayList (java.util.ArrayList)6 PortNumber (org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.PortNumber)6 Address (org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address.Address)6 SourceDestKeyBuilder (org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address.address.source.dest.key.SourceDestKeyBuilder)6 ItrRloc (org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.maprequest.ItrRloc)6 ByteBuffer (java.nio.ByteBuffer)5 IpPrefix (org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpPrefix)5 NoAddress (org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address.address.NoAddress)5