import static org.junit.Assert.assertTrue;
import com.google.common.collect.ImmutableList;
-import java.net.URI;
import java.util.Map;
import org.junit.Test;
import org.opendaylight.yangtools.yang.common.QName;
import org.opendaylight.yangtools.yang.common.QNameModule;
+import org.opendaylight.yangtools.yang.common.XMLNamespace;
import org.opendaylight.yangtools.yang.model.api.EffectiveModelContext;
import org.opendaylight.yangtools.yang.test.util.YangParserTestUtils;
final Map<QName, LeafRefContext> referencingChilds = leafRefContext.getReferencingChilds();
assertEquals(7, referencingChilds.size());
- final QNameModule bazQNameModule = QNameModule.create(URI.create(BAZ_NS));
+ final QNameModule bazQNameModule = QNameModule.create(XMLNamespace.of(BAZ_NS));
final LeafRefPath expectedPathToBazTarget = LeafRefPath.create(true,
new QNameWithPredicateImpl(bazQNameModule, "root", ImmutableList.of()),
new QNameWithPredicateImpl(bazQNameModule, "target", ImmutableList.of()));
assertLeafRef(referencingChilds.get(bar("my-leafref-in-bar")), expectedPathToBazTarget);
assertLeafRef(referencingChilds.get(bar("my-leafref-in-bar-2")), expectedPathToBazTarget);
- final QNameModule barQNameModule = QNameModule.create(URI.create(BAR_NS));
+ final QNameModule barQNameModule = QNameModule.create(XMLNamespace.of(BAR_NS));
final LeafRefPath expectedPathToBarTarget = LeafRefPath.create(true,
new QNameWithPredicateImpl(barQNameModule, "bar-target", ImmutableList.of()));
assertLeafRef(referencingChilds.get(foo("direct-leafref")), expectedPathToBarTarget);