public async Task ShouldNotFindUser() { await using (var context = new DbContextFactory().CreateContext()) { var service = new UserServiceFactory().Create(context); FluentActions.Invoking(async() => await service.UpdateAddress(Guid.NewGuid(), null)) .Should().Throw <UserNotFoundException>(); } }
public async Task Should_Update() { await using (var context = new DbContextFactory().CreateContext()) { var service = new UserServiceFactory().Create(context); var result = await service.UpdateAddress(UserId, Address); result.Should().Be(Address); } }