@Test public void testGetAuthenticationInfo() { handler.addRequest("GET", "/qcbin/rest/domains/domain/projects/project/apmuiservices/configurationusers/authentication-info", 200) .content("apmUIServiceTest_authenticationInfo.json"); AuthenticationInfo authenticationInfo = apmUIService.getAuthenticationInfo(); Assert.assertEquals(1, authenticationInfo.getAssignedWorkspaces().size()); Assert.assertEquals(1000, (int) authenticationInfo.getAssignedWorkspaces().iterator().next()); }
public AuthenticationInfo getAuthenticationInfo() { MyResultInfo result = new MyResultInfo(); int code = restService.get(result, "apmuiservices/configurationusers/authentication-info"); if(code == 200) { return new Gson().fromJson(result.getBodyAsString(), AuthenticationInfo.class); } else { errorService.showException(new RestException(result)); return null; } }
ApmUIService { public AuthenticationInfo getAuthenticationInfo() { MyResultInfo result = new MyResultInfo(); int code = restService.get(result, "apmuiservices/configurationusers/authentication-info"); if(code == 200) { return new Gson().fromJson(result.getBodyAsString(), AuthenticationInfo.class); } else { errorService.showException(new RestException(result)); return null; } } }
ApmUIService { public AuthenticationInfo getAuthenticationInfo() { MyResultInfo result = new MyResultInfo(); int code = restService.get(result, "apmuiservices/configurationusers/authentication-info"); if(code == 200) { return new Gson().fromJson(result.getBodyAsString(), AuthenticationInfo.class); } else { errorService.showException(new RestException(result)); return null; } } ApmUIService(RestService restService, EntityService entityService, ErrorService errorService); }
ApmUIService { public AuthenticationInfo getAuthenticationInfo() { MyResultInfo result = new MyResultInfo(); int code = restService.get(result, "apmuiservices/configurationusers/authentication-info"); if(code == 200) { return new Gson().fromJson(result.getBodyAsString(), AuthenticationInfo.class); } else { errorService.showException(new RestException(result)); return null; } } ApmUIService(RestService restService, EntityService entityService, ErrorService errorService); Entity createDefectInRelease(String description, String summary, String severity, String detectedBy,
                                        int releaseId, int sprintId, int teamId, int featureId, int workspaceId); Entity createRequirementInRelease(String description, String name, String priority, int storyPoints,
                                             int releaseId, int sprintId, int teamId, int featureId, int workspaceId); AuthenticationInfo getAuthenticationInfo(); }
ApmUIService { public AuthenticationInfo getAuthenticationInfo() { MyResultInfo result = new MyResultInfo(); int code = restService.get(result, "apmuiservices/configurationusers/authentication-info"); if(code == 200) { return new Gson().fromJson(result.getBodyAsString(), AuthenticationInfo.class); } else { errorService.showException(new RestException(result)); return null; } } ApmUIService(RestService restService, EntityService entityService, ErrorService errorService); Entity createDefectInRelease(String description, String summary, String severity, String detectedBy,
                                        int releaseId, int sprintId, int teamId, int featureId, int workspaceId); Entity createRequirementInRelease(String description, String name, String priority, int storyPoints,
                                             int releaseId, int sprintId, int teamId, int featureId, int workspaceId); AuthenticationInfo getAuthenticationInfo();  }