use of org.geosdi.geoplatform.response.UserDTOResponse in project geo-platform by geosdi.
the class RSAccountTest method testRetrieveUserRest.
@Test
public void testRetrieveUserRest() throws ResourceNotFoundFault {
// Number of Account Like
long numAccountsLike = gpWSClient.getAccountsCount(new SearchRequest(usernameTest, LikePatternType.CONTENT_EQUALS));
Assert.assertEquals("Number of Account Like", 1L, numAccountsLike);
// Get User from Id
// Get UserDTO from Id
UserDTOResponse userDTOResponse = gpWSClient.getShortUser(idUserTest);
UserDTO userDTOFromWS = userDTOResponse.getUserDTO();
Assert.assertNotNull(userDTOFromWS);
Assert.assertEquals("Error found UserDTO from Id", idUserTest, userDTOFromWS.getId().longValue());
// Get GPUser from Id
GPUser userFromWS = gpWSClient.getUserDetail(idUserTest);
Assert.assertNotNull(userFromWS);
Assert.assertEquals("Error found GPUser from Id", idUserTest, userFromWS.getId().longValue());
// Get User from Username
// Get UserDTO from Username
userDTOFromWS = gpWSClient.getShortUserByUsername(new SearchRequest(usernameTest, LikePatternType.CONTENT_EQUALS)).getUserDTO();
Assert.assertNotNull(userDTOFromWS);
Assert.assertEquals("Error found UserDTO from Username", idUserTest, userDTOFromWS.getId().longValue());
// Get GPUser from Username
userFromWS = gpWSClient.getUserDetailByUsername(new SearchRequest(usernameTest, LikePatternType.CONTENT_EQUALS));
Assert.assertNotNull(userFromWS);
Assert.assertEquals("Error found GPUser from Username", idUserTest, userFromWS.getId().longValue());
}
use of org.geosdi.geoplatform.response.UserDTOResponse in project geo-platform by geosdi.
the class WSAccountTest method testRetrieveUser.
@Test
public void testRetrieveUser() throws ResourceNotFoundFault {
// Number of Account Like
long numAccountsLike = gpWSClient.getAccountsCount(new SearchRequest(usernameTest, LikePatternType.CONTENT_EQUALS));
assertEquals("Number of Account Like", 1L, numAccountsLike);
// Get User from Id
// Get UserDTO from Id
UserDTOResponse userDTOResponse = gpWSClient.getShortUser(idUserTest);
UserDTO userDTOFromWS = userDTOResponse.getUserDTO();
assertNotNull(userDTOFromWS);
assertEquals("Error found UserDTO from Id", idUserTest, userDTOFromWS.getId().longValue());
// Get GPUser from Id
GPUser userFromWS = gpWSClient.getUserDetail(idUserTest);
assertNotNull(userFromWS);
assertEquals("Error found GPUser from Id", idUserTest, userFromWS.getId().longValue());
// Get User from Username
// Get UserDTO from Username
userDTOFromWS = gpWSClient.getShortUserByUsername(new SearchRequest(usernameTest, LikePatternType.CONTENT_EQUALS)).getUserDTO();
assertNotNull(userDTOFromWS);
assertEquals("Error found UserDTO from Username", idUserTest, userDTOFromWS.getId().longValue());
// Get GPUser from Username
userFromWS = gpWSClient.getUserDetailByUsername(new SearchRequest(usernameTest, LikePatternType.CONTENT_EQUALS));
assertNotNull(userFromWS);
assertEquals("Error found GPUser from Username", idUserTest, userFromWS.getId().longValue());
}
Aggregations