1 package org.opendaylight.controller.sal.restconf.impl.test;
3 import static org.junit.Assert.assertEquals;
4 import static org.junit.Assert.assertNotNull;
7 import org.opendaylight.yangtools.yang.model.api.*;
9 public abstract class YangAndXmlAndDataSchemaLoader {
11 protected static Set<Module> modules;
12 protected static DataSchemaNode dataSchemaNode;
14 protected static void dataLoad(String yangPath) {
15 dataLoad(yangPath, 1, null, null);
18 protected static void dataLoad(String yangPath, int modulesNumber, String moduleName, String dataSchemaName) {
19 modules = TestUtils.resolveModules(yangPath);
20 assertEquals(modulesNumber, modules.size());
21 Module module = TestUtils.resolveModule(moduleName, modules);
22 assertNotNull(module);
23 dataSchemaNode = TestUtils.resolveDataSchemaNode(module, dataSchemaName);
24 assertNotNull(dataSchemaNode);