use of org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeCandidateNode in project bgpcep by opendaylight.
the class VpnIpv4RIBSupportTest method testChangedRoutes.
@Test
public void testChangedRoutes() {
final Routes emptyCase = new VpnIpv4RoutesCaseBuilder().build();
DataTreeCandidateNode tree = DataTreeCandidates.fromNormalizedNode(getRoutePath(), createRoutes(emptyCase)).getRootNode();
assertTrue(RIB_SUPPORT.changedRoutes(tree).isEmpty());
final Routes emptyRoutes = new VpnIpv4RoutesCaseBuilder().setVpnIpv4Routes(new VpnIpv4RoutesBuilder().build()).build();
tree = DataTreeCandidates.fromNormalizedNode(getRoutePath(), createRoutes(emptyRoutes)).getRootNode();
assertTrue(RIB_SUPPORT.changedRoutes(tree).isEmpty());
final Routes routes = new VpnIpv4RoutesCaseBuilder().setVpnIpv4Routes(ROUTES).build();
tree = DataTreeCandidates.fromNormalizedNode(getRoutePath(), createRoutes(routes)).getRootNode();
final Collection<DataTreeCandidateNode> result = RIB_SUPPORT.changedRoutes(tree);
Assert.assertFalse(result.isEmpty());
}
use of org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeCandidateNode in project bgpcep by opendaylight.
the class LabeledUnicastIpv4RIBSupportTest method testChangedRoutes.
@Test
public void testChangedRoutes() {
final Routes emptyCase = new LabeledUnicastRoutesCaseBuilder().build();
DataTreeCandidateNode tree = DataTreeCandidates.fromNormalizedNode(getRoutePath(), createRoutes(emptyCase)).getRootNode();
Assert.assertTrue(RIB_SUPPORT.changedRoutes(tree).isEmpty());
final Routes emptyRoutes = new LabeledUnicastRoutesCaseBuilder().setLabeledUnicastRoutes(new LabeledUnicastRoutesBuilder().build()).build();
tree = DataTreeCandidates.fromNormalizedNode(getRoutePath(), createRoutes(emptyRoutes)).getRootNode();
Assert.assertTrue(RIB_SUPPORT.changedRoutes(tree).isEmpty());
final Routes routes = new LabeledUnicastRoutesCaseBuilder().setLabeledUnicastRoutes(ROUTES).build();
tree = DataTreeCandidates.fromNormalizedNode(getRoutePath(), createRoutes(routes)).getRootNode();
final Collection<DataTreeCandidateNode> result = RIB_SUPPORT.changedRoutes(tree);
Assert.assertFalse(result.isEmpty());
}
use of org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeCandidateNode in project bgpcep by opendaylight.
the class VpnIpv6RIBSupportTest method testChangedRoutes.
@Test
public void testChangedRoutes() {
final Routes emptyCase = new VpnIpv6RoutesCaseBuilder().build();
DataTreeCandidateNode tree = DataTreeCandidates.fromNormalizedNode(getRoutePath(), createRoutes(emptyCase)).getRootNode();
Assert.assertTrue(RIB_SUPPORT.changedRoutes(tree).isEmpty());
final Routes emptyRoutes = new VpnIpv6RoutesCaseBuilder().setVpnIpv6Routes(new VpnIpv6RoutesBuilder().build()).build();
tree = DataTreeCandidates.fromNormalizedNode(getRoutePath(), createRoutes(emptyRoutes)).getRootNode();
Assert.assertTrue(RIB_SUPPORT.changedRoutes(tree).isEmpty());
final Routes routes = new VpnIpv6RoutesCaseBuilder().setVpnIpv6Routes(ROUTES).build();
tree = DataTreeCandidates.fromNormalizedNode(getRoutePath(), createRoutes(routes)).getRootNode();
final Collection<DataTreeCandidateNode> result = RIB_SUPPORT.changedRoutes(tree);
Assert.assertFalse(result.isEmpty());
}
Aggregations