Rename *Swagger* classes to *OpenApi*
[netconf.git] / restconf / sal-rest-docgen / src / test / java / org / opendaylight / netconf / sal / rest / doc / impl / MountPointOpenApiTest.java
similarity index 81%
rename from restconf/sal-rest-docgen/src/test/java/org/opendaylight/netconf/sal/rest/doc/impl/MountPointSwaggerTest.java
rename to restconf/sal-rest-docgen/src/test/java/org/opendaylight/netconf/sal/rest/doc/impl/MountPointOpenApiTest.java
index ebf6846f92439a49aafa20809990a7c0eeec5cfc..352a148599ef18405cdeb014ba99f822ba68f259 100644 (file)
@@ -25,12 +25,12 @@ import org.junit.Test;
 import org.opendaylight.mdsal.dom.api.DOMMountPoint;
 import org.opendaylight.mdsal.dom.api.DOMMountPointService;
 import org.opendaylight.mdsal.dom.api.DOMSchemaService;
-import org.opendaylight.netconf.sal.rest.doc.mountpoints.MountPointSwagger;
+import org.opendaylight.netconf.sal.rest.doc.mountpoints.MountPointOpenApi;
 import org.opendaylight.netconf.sal.rest.doc.openapi.SwaggerObject;
 import org.opendaylight.yangtools.yang.common.QName;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
 
-public final class MountPointSwaggerTest extends AbstractApiDocTest {
+public final class MountPointOpenApiTest extends AbstractApiDocTest {
     private static final String HTTP_URL = "http://localhost/path";
     private static final YangInstanceIdentifier INSTANCE_ID = YangInstanceIdentifier.builder()
             .node(QName.create("", "nodes"))
@@ -38,7 +38,7 @@ public final class MountPointSwaggerTest extends AbstractApiDocTest {
             .nodeWithKey(QName.create("", "node"), QName.create("", "id"), "123").build();
     private static final String INSTANCE_URL = "/nodes/node=123/";
 
-    private MountPointSwagger swagger;
+    private MountPointOpenApi openApi;
 
     @Before
     public void before() {
@@ -51,28 +51,28 @@ public final class MountPointSwaggerTest extends AbstractApiDocTest {
         final DOMMountPointService service = mock(DOMMountPointService.class);
         when(service.getMountPoint(INSTANCE_ID)).thenReturn(Optional.of(mountPoint));
 
-        swagger = new MountPointSwaggerGeneratorRFC8040(SCHEMA_SERVICE, service).getMountPointSwagger();
+        openApi = new MountPointOpenApiGeneratorRFC8040(SCHEMA_SERVICE, service).getMountPointOpenApi();
     }
 
     @Test()
     public void getInstanceIdentifiers() {
-        assertEquals(0, swagger.getInstanceIdentifiers().size());
-        swagger.onMountPointCreated(INSTANCE_ID); // add this ID into the list of mount points
-        assertEquals(1, swagger.getInstanceIdentifiers().size());
-        assertEquals((Long) 1L, swagger.getInstanceIdentifiers().entrySet().iterator().next()
+        assertEquals(0, openApi.getInstanceIdentifiers().size());
+        openApi.onMountPointCreated(INSTANCE_ID); // add this ID into the list of mount points
+        assertEquals(1, openApi.getInstanceIdentifiers().size());
+        assertEquals((Long) 1L, openApi.getInstanceIdentifiers().entrySet().iterator().next()
                 .getValue());
-        assertEquals(INSTANCE_URL, swagger.getInstanceIdentifiers().entrySet().iterator().next()
+        assertEquals(INSTANCE_URL, openApi.getInstanceIdentifiers().entrySet().iterator().next()
                 .getKey());
-        swagger.onMountPointRemoved(INSTANCE_ID); // remove ID from list of mount points
-        assertEquals(0, swagger.getInstanceIdentifiers().size());
+        openApi.onMountPointRemoved(INSTANCE_ID); // remove ID from list of mount points
+        assertEquals(0, openApi.getInstanceIdentifiers().size());
     }
 
     @Test
     public void testGetDataStoreApi() throws Exception {
         final UriInfo mockInfo = DocGenTestHelper.createMockUriInfo(HTTP_URL);
-        swagger.onMountPointCreated(INSTANCE_ID); // add this ID into the list of mount points
+        openApi.onMountPointCreated(INSTANCE_ID); // add this ID into the list of mount points
 
-        final SwaggerObject mountPointApi = (SwaggerObject) swagger.getMountPointApi(mockInfo, 1L, "Datastores", "-");
+        final SwaggerObject mountPointApi = (SwaggerObject) openApi.getMountPointApi(mockInfo, 1L, "Datastores", "-");
         assertNotNull("failed to find Datastore API", mountPointApi);
 
         final ObjectNode pathsObject = mountPointApi.getPaths();