Esempio n. 1
0
        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>();
            }
        }
Esempio n. 2
0
        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);
            }
        }