public void ChangeRepresentative_Valid() { // Arrange var expected = "*****@*****.**"; if (!userService.FindRolesByEmail("*****@*****.**").Contains("DepartmentHead")) { userService.AddDepartmentHeadRole("*****@*****.**"); } // Act departmentService.ChangeRepresentative(expected, "*****@*****.**"); // Assert Assert.AreEqual(expected, new UserRepository(context).FindByEmail("*****@*****.**").Department.Representative.Email); }