public async Task ShouldNotFindEvent() { await using (var context = new DbContextFactory().CreateContext()) { var service = new EventServiceFactory().Create(context); FluentActions.Invoking(async() => await service.GetForHost(new Guid())) .Should().Throw <EventNotFoundException>(); } }
public async Task ShouldGetForHost() { await using (var context = new DbContextFactory().CreateContext()) { var service = new EventServiceFactory().Create(context); var result = await service.GetForHost(new Guid("74831876-FC2E-4D03-99D8-B3872BDEFD5C")); result.Should().NotBeNull(); result.Should().BeOfType <EventHostModel>(); } }