@BeforeClass public static void init() throws URISyntaxException, IOException { schemaContextYangsIetf = TestUtils.loadSchemaContext("/full-versions/yangs"); schemaContextTestModule = TestUtils.loadSchemaContext("/full-versions/test-module"); controllerContext = ControllerContext.getInstance(); brokerFacade = mock(BrokerFacade.class); restconfImpl = RestconfImpl.getInstance(); restconfImpl.setBroker(brokerFacade); restconfImpl.setControllerContext(controllerContext); Set<Module> modules = TestUtils.loadModulesFrom("/test-config-data/yang1"); schemaContext = TestUtils.loadSchemaContext(modules); loadData(); }
@BeforeClass public static void init() throws FileNotFoundException { Set<Module> allModules = TestUtils.loadModulesFrom("/full-versions/yangs"); assertNotNull(allModules); SchemaContext schemaContext = TestUtils.loadSchemaContext(allModules); ControllerContext controllerContext = ControllerContext.getInstance(); controllerContext.setSchemas(schemaContext); restconfImpl.setControllerContext(controllerContext); }