Search in sources :

Example 6 with ApiDiscoveryResponse

use of com.cloud.api.response.ApiDiscoveryResponse in project cosmic by MissionCriticalCloud.

the class ApiDiscoveryTest method verifyListSingleApi.

@Test
public void verifyListSingleApi() throws Exception {
    final ListResponse<ApiDiscoveryResponse> responses = (ListResponse<ApiDiscoveryResponse>) s_discoveryService.listApis(testUser, testApiName);
    if (responses != null) {
        final ApiDiscoveryResponse response = responses.getResponses().get(0);
        assertTrue("No. of response items should be one", responses.getCount() == 1);
        assertEquals("Error in api name", testApiName, response.getName());
        assertEquals("Error in api description", testApiDescription, response.getDescription());
        assertEquals("Error in api since", testApiSince, response.getSince());
        assertEquals("Error in api isAsync", testApiAsync, response.getAsync());
    }
}
Also used : ListResponse(com.cloud.api.response.ListResponse) ApiDiscoveryResponse(com.cloud.api.response.ApiDiscoveryResponse) Test(org.junit.Test)

Aggregations

ApiDiscoveryResponse (com.cloud.api.response.ApiDiscoveryResponse)6 ListResponse (com.cloud.api.response.ListResponse)4 ApiParameterResponse (com.cloud.api.response.ApiParameterResponse)2 Field (java.lang.reflect.Field)2 ArrayList (java.util.ArrayList)2 Test (org.junit.Test)2 APIChecker (com.cloud.acl.APIChecker)1 APICommand (com.cloud.api.APICommand)1 Parameter (com.cloud.api.Parameter)1 ServerApiException (com.cloud.api.ServerApiException)1 ApiResponseResponse (com.cloud.api.response.ApiResponseResponse)1 User (com.cloud.user.User)1 HashMap (java.util.HashMap)1 HashSet (java.util.HashSet)1 List (java.util.List)1