コード例 #1
0
ファイル: SampleTests.cs プロジェクト: virajs/Tailor
        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
ファイル: TheTailorTests.cs プロジェクト: andrewabest/Tailor
 public void WhenCreatingTheTailorWithAnEmptyConnectionString_ThrowsAnException()
 {
     Should.Throw <ArgumentException>(() => TheTailor.Create(string.Empty, typeof(IAmTheQueryAssembly).Assembly.GetExportedTypes()
                                                             .Where(x => x.Namespace == "Tailor.Tests.Sample").ToArray()));
 }