Exemplo n.º 1
0
        //public void QuickTest()
        //{
        //    DatabaseContext dbContext = GetDbContext();

        //    var it = dbContext.DocumentFieldOrigins.Find(128);
        //}

        public void TestAssemblyDbContexts(string dllFile)
        {
            _dbContextFinder.LoadDbContextTypes(dllFile);

            while (_dbContextFinder.GetNextDbContext(_connectionString, out DbContext dbContext))
            {
                TestDbContext(dbContext);
            }
        }
        public void GivenADbContext_RunDbContextTests()
        {
            _dbContextFinderToTest.LoadDbContextTypes(_dllPath);

            var xclusionList = new string[] {
                "OfferPayments",
                "BuyerAdminAllowances"
            };
            DbContext resultContext;

            _checkerToTest.SetupExclusionList(xclusionList);
            var result = _dbContextFinderToTest.GetNextDbContext(_connectionString, out resultContext);

            _checkerToTest.TestDbContext(resultContext);
        }
Exemplo n.º 3
0
        public void GivenAnAssemblyWithTwoClassesInheritingFromDbContext_WhenGettingAllDbContextTypes_ItShouldReturnAnEnumerableOfLength2()
        {
            _dbContextFinderToTest.LoadDbContextTypes(_dllPath);

            Assert.AreEqual(2, _dbContextFinderToTest.DbContextCount(), "Not all db contexts were found");
        }