@Test
public void testDerivedFromFunction() throws Exception {
// also includes test for derived-from-or-self function
- final SchemaContext schemaContext = YangParserTestUtils.parseYangSources(ImmutableList.of(
+ final SchemaContext schemaContext = YangParserTestUtils.parseYangResources(DerivedFromXPathFunctionTest.class,
"/yang-xpath-functions-test/derived-from-function/foo.yang",
- "/yang-xpath-functions-test/derived-from-function/bar.yang"));
+ "/yang-xpath-functions-test/derived-from-function/bar.yang");
assertNotNull(schemaContext);
final XPathSchemaContext jaxenSchemaContext = jaxenSchemaContextFactory.createContext(schemaContext);
@Test
public void testInvalidTypeOfCorrespondingSchemaNode() throws Exception {
- final SchemaContext schemaContext = YangParserTestUtils.parseYangSource(
+ final SchemaContext schemaContext = YangParserTestUtils.parseYangResources(DerivedFromXPathFunctionTest.class,
"/yang-xpath-functions-test/derived-from-function/bar-invalid.yang");
assertNotNull(schemaContext);
@Test
public void testInvalidNormalizedNodeValueType() throws Exception {
- final SchemaContext schemaContext = YangParserTestUtils.parseYangSources(ImmutableList.of(
+ final SchemaContext schemaContext = YangParserTestUtils.parseYangResources(DerivedFromXPathFunctionTest.class,
"/yang-xpath-functions-test/derived-from-function/foo.yang",
- "/yang-xpath-functions-test/derived-from-function/bar.yang"));
+ "/yang-xpath-functions-test/derived-from-function/bar.yang");
assertNotNull(schemaContext);
final XPathSchemaContext jaxenSchemaContext = jaxenSchemaContextFactory.createContext(schemaContext);
@Test
public void shouldFailOnUnknownPrefixOfIdentity() throws Exception {
- final SchemaContext schemaContext = YangParserTestUtils.parseYangSources(ImmutableList.of(
+ final SchemaContext schemaContext = YangParserTestUtils.parseYangResources(DerivedFromXPathFunctionTest.class,
"/yang-xpath-functions-test/derived-from-function/foo.yang",
- "/yang-xpath-functions-test/derived-from-function/bar.yang"));
+ "/yang-xpath-functions-test/derived-from-function/bar.yang");
assertNotNull(schemaContext);
final XPathSchemaContext jaxenSchemaContext = jaxenSchemaContextFactory.createContext(schemaContext);
@Test
public void shouldFailOnMalformedIdentityArgument() throws Exception {
- final SchemaContext schemaContext = YangParserTestUtils.parseYangSources(ImmutableList.of(
+ final SchemaContext schemaContext = YangParserTestUtils.parseYangResources(DerivedFromXPathFunctionTest.class,
"/yang-xpath-functions-test/derived-from-function/foo.yang",
- "/yang-xpath-functions-test/derived-from-function/bar.yang"));
+ "/yang-xpath-functions-test/derived-from-function/bar.yang");
assertNotNull(schemaContext);
final XPathSchemaContext jaxenSchemaContext = jaxenSchemaContextFactory.createContext(schemaContext);
@Test
public void shouldFailOnUnknownIdentityArgument() throws Exception {
- final SchemaContext schemaContext = YangParserTestUtils.parseYangSources(ImmutableList.of(
+ final SchemaContext schemaContext = YangParserTestUtils.parseYangResources(DerivedFromXPathFunctionTest.class,
"/yang-xpath-functions-test/derived-from-function/foo.yang",
- "/yang-xpath-functions-test/derived-from-function/bar.yang"));
+ "/yang-xpath-functions-test/derived-from-function/bar.yang");
assertNotNull(schemaContext);
final XPathSchemaContext jaxenSchemaContext = jaxenSchemaContextFactory.createContext(schemaContext);