Search in sources :

Example 1 with MountPointSwaggerGeneratorRFC8040

use of org.opendaylight.netconf.sal.rest.doc.impl.MountPointSwaggerGeneratorRFC8040 in project netconf by opendaylight.

the class ApiDocServiceImplTest method setUp.

@Before
public void setUp() {
    final EffectiveModelContext context = YangParserTestUtils.parseYangResourceDirectory("/yang");
    final DOMSchemaService schemaService = DocGenTestHelper.createMockSchemaService(context);
    final DOMMountPoint mountPoint = mock(DOMMountPoint.class);
    when(mountPoint.getService(DOMSchemaService.class)).thenReturn(Optional.of(schemaService));
    final DOMMountPointService service = mock(DOMMountPointService.class);
    when(service.getMountPoint(INSTANCE_ID)).thenReturn(Optional.of(mountPoint));
    final MountPointSwaggerGeneratorDraft02 mountPointDraft02 = new MountPointSwaggerGeneratorDraft02(schemaService, service);
    final MountPointSwaggerGeneratorRFC8040 mountPointRFC8040 = new MountPointSwaggerGeneratorRFC8040(schemaService, service);
    final ApiDocGeneratorDraftO2 apiDocGeneratorDraftO2 = new ApiDocGeneratorDraftO2(schemaService);
    final ApiDocGeneratorRFC8040 apiDocGeneratorRFC8040 = new ApiDocGeneratorRFC8040(schemaService);
    mountPointDraft02.getMountPointSwagger().onMountPointCreated(INSTANCE_ID);
    final AllModulesDocGenerator allModulesDocGenerator = new AllModulesDocGenerator(apiDocGeneratorDraftO2, apiDocGeneratorRFC8040);
    apiDocService = new ApiDocServiceImpl(mountPointDraft02, mountPointRFC8040, apiDocGeneratorDraftO2, apiDocGeneratorRFC8040, allModulesDocGenerator);
}
Also used : MountPointSwaggerGeneratorDraft02(org.opendaylight.netconf.sal.rest.doc.impl.MountPointSwaggerGeneratorDraft02) ApiDocGeneratorDraftO2(org.opendaylight.netconf.sal.rest.doc.impl.ApiDocGeneratorDraftO2) AllModulesDocGenerator(org.opendaylight.netconf.sal.rest.doc.impl.AllModulesDocGenerator) MountPointSwaggerGeneratorRFC8040(org.opendaylight.netconf.sal.rest.doc.impl.MountPointSwaggerGeneratorRFC8040) ApiDocServiceImpl(org.opendaylight.netconf.sal.rest.doc.impl.ApiDocServiceImpl) DOMMountPoint(org.opendaylight.mdsal.dom.api.DOMMountPoint) DOMMountPointService(org.opendaylight.mdsal.dom.api.DOMMountPointService) DOMSchemaService(org.opendaylight.mdsal.dom.api.DOMSchemaService) EffectiveModelContext(org.opendaylight.yangtools.yang.model.api.EffectiveModelContext) ApiDocGeneratorRFC8040(org.opendaylight.netconf.sal.rest.doc.impl.ApiDocGeneratorRFC8040) Before(org.junit.Before)

Aggregations

Before (org.junit.Before)1 DOMMountPoint (org.opendaylight.mdsal.dom.api.DOMMountPoint)1 DOMMountPointService (org.opendaylight.mdsal.dom.api.DOMMountPointService)1 DOMSchemaService (org.opendaylight.mdsal.dom.api.DOMSchemaService)1 AllModulesDocGenerator (org.opendaylight.netconf.sal.rest.doc.impl.AllModulesDocGenerator)1 ApiDocGeneratorDraftO2 (org.opendaylight.netconf.sal.rest.doc.impl.ApiDocGeneratorDraftO2)1 ApiDocGeneratorRFC8040 (org.opendaylight.netconf.sal.rest.doc.impl.ApiDocGeneratorRFC8040)1 ApiDocServiceImpl (org.opendaylight.netconf.sal.rest.doc.impl.ApiDocServiceImpl)1 MountPointSwaggerGeneratorDraft02 (org.opendaylight.netconf.sal.rest.doc.impl.MountPointSwaggerGeneratorDraft02)1 MountPointSwaggerGeneratorRFC8040 (org.opendaylight.netconf.sal.rest.doc.impl.MountPointSwaggerGeneratorRFC8040)1 EffectiveModelContext (org.opendaylight.yangtools.yang.model.api.EffectiveModelContext)1