Ejemplo 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>();
            }
        }
Ejemplo 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);
            }
        }