コード例 #1
0
        public void RetrieveRolesByUserId_Ok()
        {
            var userId = UserHelper.Retrieves().Where(u => u.UserName == "Admin").FirstOrDefault().Id;

            Assert.NotEmpty(RoleHelper.RetrievesByUserId(userId));
        }
コード例 #2
0
        public void SaveRolesByUserId_Ok()
        {
            var userId = UserHelper.Retrieves().Where(u => u.UserName == "Admin").FirstOrDefault().Id;

            Assert.True(RoleHelper.SaveByUserId(userId, RoleHelper.Retrieves().Select(r => r.Id)));
        }