public void RemoveUserAddressAsync_GivenNull_ThrowsException() { UserAddressService addressService = new UserAddressService(CreateUserAddressMockRepository().Object); Func <Task> act = async() => await addressService.RemoveUserAddressAsync(null); act.Should().Throw <ArgumentNullException>(); }
public async Task RemoveUserAddressAsync_Id_InvokesRepositoryRemoveAsync() { var repositoryMock = CreateUserAddressMockRepository(); UserAddressService addressService = new UserAddressService(repositoryMock.Object); await addressService.RemoveUserAddressAsync("1"); repositoryMock.Verify(p => p.RemoveAsync("1"), Times.Once); }