示例#1
0
        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);
            }
        }
示例#2
0
        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);
            }
        }
示例#3
0
 public void WhenCreatingTheTailorWithAnEmptyConnectionString_ThrowsAnException()
 {
     Should.Throw <ArgumentException>(() => TheTailor.Create(string.Empty, typeof(IAmTheQueryAssembly).Assembly.GetExportedTypes()
                                                             .Where(x => x.Namespace == "Tailor.Tests.Sample").ToArray()));
 }