Пример #1
0
        public async Task ShouldNotFindEvent()
        {
            await using (var context = new DbContextFactory().CreateContext())
            {
                var service = new EventServiceFactory().Create(context);

                FluentActions.Invoking(async() => await service.GetForPublic(new Guid(), new Guid()))
                .Should().Throw <EventNotFoundException>();
            }
        }
Пример #2
0
        public async Task ShouldGetForPublic()
        {
            await using (var context = new DbContextFactory().CreateContext())
            {
                var service = new EventServiceFactory().Create(context);

                var result = await service.GetForPublic(RealEventId, new Guid());

                result.Should().NotBeNull();
                result.Should().BeOfType <EventDetailModel>();
            }
        }