public void createFullUser() { User user = new User(); user = AMUserHelpers.createFullUser(); AMUserHelpers.checkUserField(user); AMUserHelpers.deleteUser(user.Id); }
public void addMemberGroupNotExistUser() { User user = new User("user_test" + rnd.Next(100000), true); user = AMUserHelpers.createUser(user); AMMembershipsHelpers.addMemberGroupNotExistUser(Guid.NewGuid().ToString(), user.Id); AMUserHelpers.deleteUser(user.Id); }
public void deleteUser() { User user = new User("user_test" + rnd.Next(10000), true); user = AMUserHelpers.createUser(user); AMUserHelpers.deleteUser(user.Id); AMUserHelpers.getUserNotExist(user.Id); }
public void createUserSameLogin() { User user = new User("user_test" + rnd.Next(10000), true); user = AMUserHelpers.createUser(user); AMUserHelpers.createUserSameLogin(user.Login); AMUserHelpers.deleteUser(user.Id); }
public void updateUser() { User user = new User("user_test" + rnd.Next(10000), true); user = AMUserHelpers.createUser(user); user = AMUserHelpers.updateUser(user); AMUserHelpers.checkUserField(user); AMUserHelpers.deleteUser(user.Id); }
public void getMemberUserNoGroup() { User user = new User("user_test" + rnd.Next(100000), true); user = AMUserHelpers.createUser(user); Groups groupList = AMMembershipsHelpers.getUserGroup(user.Id); Assert.AreEqual(0, groupList.Items.Count, "Пользователь состоит в группах"); AMUserHelpers.deleteUser(user.Id); }
public void createUserNoEnable() { string login = "******" + rnd.Next(10000); User user = AMUserHelpers.createUserNoEnable(login); User item = new User(); item = AMUserHelpers.getUserById(user.Id); Assert.IsFalse(item.Enabled, "Enabled is not FALSE"); AMUserHelpers.deleteUser(user.Id); }
public void addMemberGroupUser() { User user = new User("user_test" + rnd.Next(100000), true); Group group = new Group("group_test" + rnd.Next(100000), true); user = AMUserHelpers.createUser(user); group = AMGroupHelpers.createGroup(group); AMMembershipsHelpers.addMemberGroupUsers(group.Id, new string[] { user.Id }); Assert.IsTrue(AMMembershipsHelpers.checkMemberGroupUser(group.Id, user.Id), "Пользователя " + user.Id + " нет в группе " + group.Id); AMGroupHelpers.deleteGroup(group.Id); AMUserHelpers.deleteUser(user.Id); }
public void deleteMemberUserGroup() { User user = new User("user_test" + rnd.Next(100000), true); Group group = new Group("group_test" + rnd.Next(100000), true); user = AMUserHelpers.createUser(user); group = AMGroupHelpers.createGroup(group); AMMembershipsHelpers.addMemberUserGroups(user.Id, new string[] { group.Id }); AMMembershipsHelpers.deleteMemberUserGroups(user.Id, new string[] { group.Id }); Assert.IsFalse(AMMembershipsHelpers.checkMemberUserGroup(group.Id, user.Id), "Пользователь " + user.Id + " не удален из группы " + group.Id); AMGroupHelpers.deleteGroup(group.Id); AMUserHelpers.deleteUser(user.Id); }
public void deleteGroupWithMembers() { User user = new User("user_test" + rnd.Next(100000), true); Group group = new Group("group_test" + rnd.Next(100000), true); user = AMUserHelpers.createUser(user); group = AMGroupHelpers.createGroup(group); AMMembershipsHelpers.addMemberUserGroups(user.Id, new string[] { group.Id }); Assert.IsTrue(AMMembershipsHelpers.checkMemberGroupUser(group.Id, user.Id), "Пользователя " + user.Id + " нет в группе " + group.Id); AMGroupHelpers.deleteGroup(group.Id); Groups groupsList = AMMembershipsHelpers.getUserGroup(user.Id); Assert.AreEqual(0, groupsList.TotalResults, "Пользователь входит в состав группы"); AMUserHelpers.deleteUser(user.Id); }