@Test public void requestUserInfoInvalidRequest() throws Exception { showTitle("requestUserInfoInvalidRequest"); UserInfoClient userInfoClient = new UserInfoClient(userInfoEndpoint); UserInfoResponse response = userInfoClient.execUserInfo(null); showClient(userInfoClient); assertEquals(response.getStatus(), 400, "Unexpected response code: " + response.getStatus()); assertNotNull(response.getErrorType(), "Unexpected result: errorType not found"); assertNotNull(response.getErrorDescription(), "Unexpected result: errorDescription not found"); }
@Test public void requestUserInfoInvalidToken() throws Exception { showTitle("requestUserInfoInvalidToken"); UserInfoClient userInfoClient = new UserInfoClient(userInfoEndpoint); UserInfoResponse response = userInfoClient.execUserInfo("INVALID_ACCESS_TOKEN"); showClient(userInfoClient); assertEquals(response.getStatus(), 400, "Unexpected response code: " + response.getStatus()); assertNotNull(response.getErrorType(), "Unexpected result: errorType not found"); assertNotNull(response.getErrorDescription(), "Unexpected result: errorDescription not found"); }
assertEquals(userInfoResponse.getStatus(), 403, "Unexpected response code: " + userInfoResponse.getStatus()); assertNotNull(userInfoResponse.getErrorType(), "Unexpected result: errorType not found"); assertNotNull(userInfoResponse.getErrorDescription(), "Unexpected result: errorDescription not found");
assertEquals(userInfoResponse.getStatus(), 403, "Unexpected response code: " + userInfoResponse.getStatus()); assertNotNull(userInfoResponse.getErrorType(), "Unexpected result: errorType not found"); assertNotNull(userInfoResponse.getErrorDescription(), "Unexpected result: errorDescription not found");
assertEquals(userInfoResponse.getStatus(), 400, "Unexpected response code: " + userInfoResponse.getStatus()); assertNotNull(userInfoResponse.getErrorType(), "Unexpected result: errorType not found"); assertNotNull(userInfoResponse.getErrorDescription(), "Unexpected result: errorDescription not found");
assertEquals(userInfoResponse.getStatus(), 400, "Unexpected response code: " + userInfoResponse.getStatus()); assertNotNull(userInfoResponse.getErrorType(), "Unexpected result: errorType not found"); assertNotNull(userInfoResponse.getErrorDescription(), "Unexpected result: errorDescription not found");
assertEquals(response7.getStatus(), 400, "Unexpected response code: " + response7.getStatus()); assertNotNull(response7.getErrorType(), "Unexpected result: errorType not found"); assertNotNull(response7.getErrorDescription(), "Unexpected result: errorDescription not found");
assertEquals(userInfoResponse2.getStatus(), 400, "Unexpected response code: " + userInfoResponse2.getStatus()); assertNotNull(userInfoResponse2.getErrorType(), "Unexpected result: errorType not found"); assertNotNull(userInfoResponse2.getErrorDescription(), "Unexpected result: errorDescription not found");
assertEquals(userInfoResponse2.getStatus(), 400, "Unexpected response code: " + userInfoResponse2.getStatus()); assertNotNull(userInfoResponse2.getErrorType(), "Unexpected result: errorType not found"); assertNotNull(userInfoResponse2.getErrorDescription(), "Unexpected result: errorDescription not found");
assertEquals(userInfoResponse2.getStatus(), 400, "Unexpected response code: " + userInfoResponse2.getStatus()); assertNotNull(userInfoResponse2.getErrorType(), "Unexpected result: errorType not found"); assertNotNull(userInfoResponse2.getErrorDescription(), "Unexpected result: errorDescription not found");
assertEquals(userInfoResponse1.getStatus(), 400, "Unexpected response code: " + userInfoResponse1.getStatus()); assertNotNull(userInfoResponse1.getErrorType(), "Unexpected result: errorType not found"); assertNotNull(userInfoResponse1.getErrorDescription(), "Unexpected result: errorDescription not found"); assertEquals(userInfoResponse2.getStatus(), 400, "Unexpected response code: " + userInfoResponse2.getStatus()); assertNotNull(userInfoResponse2.getErrorType(), "Unexpected result: errorType not found"); assertNotNull(userInfoResponse2.getErrorDescription(), "Unexpected result: errorDescription not found");