示例#1
0
        public void SaveByGroupId_Ok()
        {
            var groupId = GroupHelper.Retrieves().FirstOrDefault(g => g.GroupName == "Admin").Id;
            var id      = UserHelper.Retrieves().FirstOrDefault(u => u.UserName == "Admin").Id;

            Assert.True(UserHelper.SaveByGroupId(groupId, new string[] { id }));

            var users = UserHelper.RetrievesByGroupId(groupId);

            Assert.NotEmpty(users.Where(u => u.Checked == "checked"));

            Assert.True(UserHelper.SaveByGroupId(groupId, new string[0]));
        }