use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.evpn.rev200120.evpn.EvpnChoice in project bgpcep by opendaylight.
the class MACIpAdvRParserTest method parserCase1Test.
@Test
public void parserCase1Test() {
final MacIpAdvRouteCase expected = createdExpectedResult();
assertArrayEquals(RESULT, ByteArray.getAllBytes(this.parser.serializeEvpn(expected, Unpooled.wrappedBuffer(ROUDE_DISTIN))));
final EvpnChoice result = this.parser.parseEvpn(Unpooled.wrappedBuffer(VALUE));
assertEquals(expected, result);
final EvpnChoice modelResult = this.parser.serializeEvpnModel(createMacIpCont());
assertEquals(expected, modelResult);
final EvpnChoice keyResult = this.parser.createRouteKey(createMacIpCont());
assertEquals(createdExpectedRouteKey(), keyResult);
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.evpn.rev200120.evpn.EvpnChoice in project bgpcep by opendaylight.
the class EthSegRParserTest method parserTest.
@Test
public void parserTest() {
final EsRouteCase expected = new EsRouteCaseBuilder().setEsRoute(new EsRouteBuilder().setEsi(LAN_AUT_GEN_CASE).setOrigRouteIp(IP).build()).build();
assertArrayEquals(RESULT, ByteArray.getAllBytes(this.parser.serializeEvpn(expected, Unpooled.wrappedBuffer(ROUDE_DISTIN))));
final EvpnChoice result = this.parser.parseEvpn(Unpooled.wrappedBuffer(VALUE));
assertEquals(expected, result);
final ContainerNode arbitraryC = createContBuilder(EthSegRParser.ES_ROUTE_NID).addChild(LanParserTest.createLanChoice()).addChild(createValueBuilder(IP_MODEL, ORI_NID).build()).build();
final EvpnChoice modelResult = this.parser.serializeEvpnModel(arbitraryC);
assertEquals(expected, modelResult);
final EvpnChoice keyResult = this.parser.createRouteKey(arbitraryC);
assertEquals(expected, keyResult);
}
Aggregations