use of org.opendaylight.netconf.sal.rest.doc.impl.ApiDocGeneratorRFC8040 in project netconf by opendaylight.
the class ApiDocGeneratorRFC8040Test method setUp.
@Before
public void setUp() {
context = YangParserTestUtils.parseYangResourceDirectory("/yang");
generator = new ApiDocGeneratorRFC8040(DocGenTestHelper.createMockSchemaService(context));
}
use of org.opendaylight.netconf.sal.rest.doc.impl.ApiDocGeneratorRFC8040 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);
}
Aggregations