public void Given_employee_without_user_When_MarkForDelete_Then_should_mark_for_delete_as_expected() { // Given var employee = new Employee(); var userForAuditing = new UserForAuditing(); // When employee.MarkForDelete(userForAuditing); // Then Assert.That(employee.Deleted, Is.True); Assert.That(employee.LastModifiedBy, Is.EqualTo(userForAuditing)); Assert.That(employee.User, Is.Null); }
public void Given_employee_When_mark_for_delete_Then_deleted_set_to_true() { //Given var employee = new Employee(); var userDeletingEmployee = new UserForAuditing(); //When employee.MarkForDelete(userDeletingEmployee); //Then Assert.That(employee.Deleted, Is.True); Assert.That(employee.LastModifiedOn.Value.Date, Is.EqualTo(DateTime.Today)); Assert.That(employee.LastModifiedBy, Is.EqualTo(userDeletingEmployee)); }