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