Search in sources :

Example 1 with JSONRestconfServiceImpl

use of org.opendaylight.netconf.sal.restconf.impl.JSONRestconfServiceImpl in project netconf by opendaylight.

the class JSONRestconfServiceImplTest method setup.

@Before
public void setup() throws FileNotFoundException {
    final EffectiveModelContext mountPointSchemaContext = TestUtils.loadSchemaContext("/full-versions/test-module");
    final ControllerContext controllerContext = TestRestconfUtils.newControllerContext(schemaContext, mockMountPoint);
    doReturn(java.util.Optional.of(FixedDOMSchemaService.of(() -> mountPointSchemaContext))).when(mockMountPoint).getService(eq(DOMSchemaService.class));
    service = new JSONRestconfServiceImpl(controllerContext, RestconfImpl.newInstance(brokerFacade, controllerContext));
}
Also used : ControllerContext(org.opendaylight.netconf.sal.restconf.impl.ControllerContext) FixedDOMSchemaService(org.opendaylight.mdsal.dom.spi.FixedDOMSchemaService) DOMSchemaService(org.opendaylight.mdsal.dom.api.DOMSchemaService) EffectiveModelContext(org.opendaylight.yangtools.yang.model.api.EffectiveModelContext) JSONRestconfServiceImpl(org.opendaylight.netconf.sal.restconf.impl.JSONRestconfServiceImpl) Before(org.junit.Before)

Aggregations

Before (org.junit.Before)1 DOMSchemaService (org.opendaylight.mdsal.dom.api.DOMSchemaService)1 FixedDOMSchemaService (org.opendaylight.mdsal.dom.spi.FixedDOMSchemaService)1 ControllerContext (org.opendaylight.netconf.sal.restconf.impl.ControllerContext)1 JSONRestconfServiceImpl (org.opendaylight.netconf.sal.restconf.impl.JSONRestconfServiceImpl)1 EffectiveModelContext (org.opendaylight.yangtools.yang.model.api.EffectiveModelContext)1