예제 #1
0
        public async Task ShouldNotFind()
        {
            await using (var context = new DbContextFactory().CreateContext())
            {
                var service = new AuthServiceFactory().Create(context);

                FluentActions.Invoking(async() => await service.Authenticate(new Guid()))
                .Should().Throw <UserNotFoundException>();
            }
        }
예제 #2
0
        public async Task ShouldLogin()
        {
            await using (var context = new DbContextFactory().CreateContext())
            {
                var service = new AuthServiceFactory().Create(context);

                var result = await service.Authenticate(new Guid("046E876E-D413-45AF-AC2A-552D7AA46C5C"));

                result.Should().NotBeNull();
            }
        }