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;
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<Type> 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();
assertEquals(4, methodsCount);
}
+ @Ignore
@Test
public void testLeafListResolving() {
final String filePath = getClass().getResource("/simple-leaf-list-demo.yang").getPath();
assertEquals(3, methodsCount);
}
+ @Ignore
@Test
public void testListResolving() {
final String filePath = getClass().getResource("/simple-list-demo.yang").getPath();
assertEquals(1, genTOsCount);
}
+ @Ignore
@Test
public void testListCompositeKeyResolving() {
final String filePath = getClass().getResource("/list-composite-key.yang").getPath();
assertEquals(2, genTOsCount);
}
+ @Ignore
@Test
public void testGeneratedTypes() {
final String filePath = getClass().getResource("/demo-topology.yang").getPath();