public void Given_responsibility_found_When_Undelete_Then_tell_it_to_Undelete_itself() { // Given _target = GetTarget(); // When _target.Undelete(_responsibilityId, _companyId, _actioningUserId); // Then _responsibility.Verify(x => x.ReinstateFromDelete(_actioningUser)); }
public void When_Undelete_Then_get_responsibility_from_repo() { // Given _target = GetTarget(); // When _target.Undelete(_responsibilityId, _companyId, _actioningUserId); // Then _responsibilityRepo.Verify(x => x.GetByIdAndCompanyId(_responsibilityId, _companyId)); }
public void Given_responsibility_not_found_When_Undelete_Then_throw_exception() { // Given _responsibilityRepo .Setup(x => x.GetByIdAndCompanyId(_responsibilityId, _companyId)); _target = GetTarget(); // When // Then var e = Assert.Throws<ResponsibilityNotFoundException>(() => _target.Undelete(_responsibilityId, _companyId, _actioningUserId)); _log.Verify(x => x.Add(e)); }