public async Task AllQueries_MustSatisfyTheTailor() { var results = await Task.WhenAll( TheTailor .Create(TestDbConnectionString, typeof(IAmTheQueryAssembly).Assembly.GetExportedTypes().Where(x => x.Namespace == "Tailor.Tests.Sample").ToArray()) .Measure(typeof(NotFoundException))); foreach (var result in results) { result.WithFailureAssertion(Assert.Fail); } }
public async Task AllQueries_MustSatisfyTheTailor() { var results = await Task.WhenAll( TheTailor .Create(@"Server=(localdb)\MSSQLLocalDB; Database=Eventador.EventadorContext; Integrated Security=True; MultipleActiveResultSets=True", typeof(IAmTheQueryAssembly).Assembly.GetExportedTypes().ToArray()) .Measure(typeof(NotFoundException))); foreach (var result in results) { result.WithFailureAssertion(Assert.Fail); } }
public void WhenCreatingTheTailorWithAnEmptyConnectionString_ThrowsAnException() { Should.Throw <ArgumentException>(() => TheTailor.Create(string.Empty, typeof(IAmTheQueryAssembly).Assembly.GetExportedTypes() .Where(x => x.Namespace == "Tailor.Tests.Sample").ToArray())); }