- DataSchemaNode dataSchemaNode = null;
- try {
- dataSchemaNode = TestUtils.obtainSchemaFromYang(yangPath, moduleName);
- } catch (FileNotFoundException e) {
- LOG.error(e.getMessage());
- assertTrue(false);
- }
- assertNotNull(dataSchemaNode);
+ }
+
+ private void simpleTest(final String jsonPath, final String yangPath, final String topLevelElementName,
+ final String namespace, final String moduleName) {
+ CompositeNode compNode = loadAndNormalizeData(jsonPath, yangPath, topLevelElementName, moduleName);
+ verifyCompositeNode(compNode, namespace);
+ }
+
+ private CompositeNode loadAndNormalizeData(final String jsonPath, final String yangPath,
+ final String topLevelElementName, final String moduleName) {
+ Node<?> node = TestUtils.readInputToCnSn(jsonPath, false, JsonToCompositeNodeProvider.INSTANCE);
+ assertTrue(node instanceof CompositeNode);
+ CompositeNode compositeNode = (CompositeNode)node;
+
+ Set<Module> modules = null;
+ modules = TestUtils.loadModulesFrom(yangPath);
+ assertNotNull(modules);