public void ShouldReturnOk() { const int userId = 1; var newAddress = AddressFakeMother.OkAddress(); var(ok, exception) = new UpdateUserAddressFacade(_getUserRepository, _updateRepository).Exec(userId, newAddress); Assert.IsTrue(ok); Assert.Null(exception); }
public void ShouldReturnFail_with_exception() { const int userId = default; var newAddress = AddressFakeMother.OkAddress(); var(ok, exception) = new UpdateUserAddressFacade(_getUserRepository, _updateRepository).Exec(userId, newAddress); Assert.IsFalse(ok); Assert.NotNull(exception); Assert.IsTrue(exception is NotFoundException); Assert.AreEqual(new NotFoundException("User").Message, exception.Message); }