X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fsal%2Fyang-prototype%2Fcode-generator%2Fbinding-generator-impl%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Fbinding%2Fyang%2Ftypes%2Ftest%2FGeneratedTypesTest.java;h=a6817a7391ac6dff1507ed4de387972d6597fcef;hb=4ce0f6630bc576b97c8c9a08848aafb6e90a75b0;hp=095208d9779ec10ee38411f14de89dd555507e16;hpb=ca85a6f3a39b406ab122fe985ee010a41489f658;p=controller.git diff --git a/opendaylight/sal/yang-prototype/code-generator/binding-generator-impl/src/test/java/org/opendaylight/controller/sal/binding/yang/types/test/GeneratedTypesTest.java b/opendaylight/sal/yang-prototype/code-generator/binding-generator-impl/src/test/java/org/opendaylight/controller/sal/binding/yang/types/test/GeneratedTypesTest.java index 095208d977..a6817a7391 100644 --- a/opendaylight/sal/yang-prototype/code-generator/binding-generator-impl/src/test/java/org/opendaylight/controller/sal/binding/yang/types/test/GeneratedTypesTest.java +++ b/opendaylight/sal/yang-prototype/code-generator/binding-generator-impl/src/test/java/org/opendaylight/controller/sal/binding/yang/types/test/GeneratedTypesTest.java @@ -13,6 +13,7 @@ import static org.junit.Assert.assertTrue; import java.util.List; import java.util.Set; +import org.junit.Ignore; import org.junit.Test; import org.opendaylight.controller.sal.binding.generator.api.BindingGenerator; import org.opendaylight.controller.sal.binding.generator.impl.BindingGeneratorImpl; @@ -35,7 +36,24 @@ public class GeneratedTypesTest { return parser.resolveSchemaContext(modules); } - + + @Test + public void testMultipleModulesResolving() { + final String topologyPath = getClass().getResource("/abstract-topology.yang").getPath(); + final String typesPath = getClass().getResource("/ietf-inet-types@2010-09-24.yang").getPath(); + final SchemaContext context = resolveSchemaContextFromFiles(topologyPath, typesPath); + assertTrue(context != null); + + final BindingGenerator bindingGen = new BindingGeneratorImpl(); + final List genTypes = bindingGen.generateTypes(context); + + assertTrue(genTypes != null); + assertEquals(11, genTypes.size()); + + + } + + @Ignore @Test public void testContainerResolving() { final String filePath = getClass().getResource("/simple-container-demo.yang").getPath(); @@ -113,6 +131,7 @@ public class GeneratedTypesTest { assertEquals(4, methodsCount); } + @Ignore @Test public void testLeafListResolving() { final String filePath = getClass().getResource("/simple-leaf-list-demo.yang").getPath(); @@ -185,6 +204,7 @@ public class GeneratedTypesTest { assertEquals(3, methodsCount); } + @Ignore @Test public void testListResolving() { final String filePath = getClass().getResource("/simple-list-demo.yang").getPath(); @@ -266,6 +286,7 @@ public class GeneratedTypesTest { assertEquals(1, genTOsCount); } + @Ignore @Test public void testListCompositeKeyResolving() { final String filePath = getClass().getResource("/list-composite-key.yang").getPath(); @@ -313,6 +334,7 @@ public class GeneratedTypesTest { assertEquals(2, genTOsCount); } + @Ignore @Test public void testGeneratedTypes() { final String filePath = getClass().getResource("/demo-topology.yang").getPath();