@Test( groups = {"wso2.greg"}, dependsOnMethods = {"addResource"}) public void searchActivityByUnAvailableUser() throws RegistryExceptionException, RemoteException, GetAllRolesNamesUserAdminExceptionException { int id = 0; String unAvailableUser = "******" + id; while (userManagementClient.userNameExists(unAvailableUser, unAvailableUser)) { if (!userManagementClient.userNameExists(unAvailableUser, unAvailableUser)) { id++; } unAvailableUser = "******" + id; } assertNull( activityAdminServiceClient .getActivities( environment.getGreg().getSessionCookie(), unAvailableUser, "", "", "", "", 0) .getActivity()); }
@Test(dependsOnMethods = "testCreateRole") public void testAddUserToRole() throws Exception { user1UserManagementClient.updateUserListOfRole( NEW_ROLE, new String[] {NEW_USER}, new String[] {}); Assert.assertTrue(adminUserManagementClient.userNameExists(NEW_ROLE, NEW_USER)); }