public void UserRoleService_Put() { CACI.DAL.Models.UserRole application = new CACI.DAL.Models.UserRole() { CreatedDate = DateTime.Now.AddDays(-8), ModifiedDate = DateTime.Now, RoleId = 1, UserId = 1, UserRoleId = 1 }; UserRoleController _controller = new UserRoleController(_mockService.Object); var result = _controller.Put(application); Assert.IsNotNull(result); }
public void TestUpdateUserRole() { var userRole = RandomUserRole(); _userRoleService.Create(userRole); var updateRole = userRole.Clone(); updateRole.Permissions.Add((int)Permission.WordEntry); _ = _userRoleController.Put(_projId, userRole.Id, updateRole).Result; var allUserRoles = _userRoleService.GetAllUserRoles(_projId).Result; Assert.Contains(updateRole, allUserRoles); }