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);
}
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);
}
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);
}
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));
}
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);
}
Aggregations