import org.opendaylight.yangtools.yang.data.api.schema.ContainerNode;
import org.opendaylight.yangtools.yang.data.api.schema.LeafNode;
import org.opendaylight.yangtools.yang.data.api.schema.MapNode;
-import org.opendaylight.yangtools.yang.data.api.schema.xpath.XPathDocument;
-import org.opendaylight.yangtools.yang.data.api.schema.xpath.XPathSchemaContext;
import org.opendaylight.yangtools.yang.data.impl.schema.Builders;
-import org.opendaylight.yangtools.yang.model.api.SchemaContext;
+import org.opendaylight.yangtools.yang.data.jaxen.api.XPathDocument;
+import org.opendaylight.yangtools.yang.data.jaxen.api.XPathSchemaContext;
+import org.opendaylight.yangtools.yang.model.api.EffectiveModelContext;
import org.opendaylight.yangtools.yang.test.util.YangParserTestUtils;
public class EnumValueXPathFunctionTest {
@Test
public void testEnumValueFunction() throws Exception {
- final SchemaContext schemaContext = YangParserTestUtils.parseYangResources(EnumValueXPathFunctionTest.class,
- "/yang-xpath-functions-test/enum-value-function/foo.yang");
+ final EffectiveModelContext schemaContext = YangParserTestUtils.parseYangResources(
+ EnumValueXPathFunctionTest.class, "/yang-xpath-functions-test/enum-value-function/foo.yang");
assertNotNull(schemaContext);
final XPathSchemaContext jaxenSchemaContext = SCHEMA_CONTEXT_FACTORY.createContext(schemaContext);
@Test
public void testInvalidTypeOfCorrespondingSchemaNode() throws Exception {
- final SchemaContext schemaContext = YangParserTestUtils.parseYangResources(EnumValueXPathFunctionTest.class,
- "/yang-xpath-functions-test/enum-value-function/foo-invalid.yang");
+ final EffectiveModelContext schemaContext = YangParserTestUtils.parseYangResources(
+ EnumValueXPathFunctionTest.class, "/yang-xpath-functions-test/enum-value-function/foo-invalid.yang");
assertNotNull(schemaContext);
final XPathSchemaContext jaxenSchemaContext = SCHEMA_CONTEXT_FACTORY.createContext(schemaContext);
@Test
public void testInvalidNormalizedNodeValueType() throws Exception {
- final SchemaContext schemaContext = YangParserTestUtils.parseYangResources(EnumValueXPathFunctionTest.class,
- "/yang-xpath-functions-test/enum-value-function/foo.yang");
+ final EffectiveModelContext schemaContext = YangParserTestUtils.parseYangResources(
+ EnumValueXPathFunctionTest.class, "/yang-xpath-functions-test/enum-value-function/foo.yang");
assertNotNull(schemaContext);
final XPathSchemaContext jaxenSchemaContext = SCHEMA_CONTEXT_FACTORY.createContext(schemaContext);
@Test
public void shouldFailOnUnknownEnumNodeValue() throws Exception {
- final SchemaContext schemaContext = YangParserTestUtils.parseYangResources(EnumValueXPathFunctionTest.class,
- "/yang-xpath-functions-test/enum-value-function/foo.yang");
+ final EffectiveModelContext schemaContext = YangParserTestUtils.parseYangResources(
+ EnumValueXPathFunctionTest.class, "/yang-xpath-functions-test/enum-value-function/foo.yang");
assertNotNull(schemaContext);
final XPathSchemaContext jaxenSchemaContext = SCHEMA_CONTEXT_FACTORY.createContext(schemaContext);