InstanceIdentifier.builder(Cont.class).child(ContAug.class, GrpCont.class).build());
assertEquals(YangInstanceIdentifier.create(NodeIdentifier.create(Cont.QNAME),
NodeIdentifier.create(ContChoice.QNAME),
- NodeIdentifier.create(GrpCont.QNAME.withModule(ContAug.QNAME.getModule()))), contAug);
+ NodeIdentifier.create(GrpCont.QNAME.bindTo(ContAug.QNAME.getModule()))), contAug);
// Legacy: downcast the child to Class, losing type safety but still working. Faced with ambiguity, it will
// select the lexically-lower class
final YangInstanceIdentifier rootAug = codecContext.toYangInstanceIdentifier(
InstanceIdentifier.builder(RootAug.class, GrpCont.class).build());
assertEquals(YangInstanceIdentifier.create(NodeIdentifier.create(Root.QNAME),
- NodeIdentifier.create(GrpCont.QNAME.withModule(RootAug.QNAME.getModule()))), rootAug);
+ NodeIdentifier.create(GrpCont.QNAME.bindTo(RootAug.QNAME.getModule()))), rootAug);
}
@Test
final InstanceIdentifier<?> contAug = codecContext.fromYangInstanceIdentifier(
YangInstanceIdentifier.create(NodeIdentifier.create(Cont.QNAME), NodeIdentifier.create(ContChoice.QNAME),
- NodeIdentifier.create(GrpCont.QNAME.withModule(ContAug.QNAME.getModule()))));
+ NodeIdentifier.create(GrpCont.QNAME.bindTo(ContAug.QNAME.getModule()))));
assertEquals(InstanceIdentifier.builder(Cont.class).child(ContAug.class, GrpCont.class).build(), contAug);
final InstanceIdentifier<?> rootBase = codecContext.fromYangInstanceIdentifier(
final InstanceIdentifier<?> rootAug = codecContext.fromYangInstanceIdentifier(
YangInstanceIdentifier.create(NodeIdentifier.create(Root.QNAME),
- NodeIdentifier.create(GrpCont.QNAME.withModule(RootAug.QNAME.getModule()))));
+ NodeIdentifier.create(GrpCont.QNAME.bindTo(RootAug.QNAME.getModule()))));
assertEquals(InstanceIdentifier.builder(RootAug.class, GrpCont.class).build(), rootAug);
}
}