public async Task GetAddress_InvalidId_ShouldReturnAddress() { var sut = new GetAddressQueryHandler(_fixture.Context); await sut.Handle(new GetAddressQuery { Id = Guid.NewGuid() }, CancellationToken.None) .ShouldThrowAsync <NotFoundException>(); }
public async Task GetAddress_ValidId_ShouldReturnAddress() { var sut = new GetAddressQueryHandler(_fixture.Context); var result = await sut.Handle(new GetAddressQuery { Id = _fixture.ValidAddressId }, CancellationToken.None); result.ShouldBeOfType <AddressDto>(); result.Id.ShouldBe(_fixture.ValidAddressId); }