//public void TestAllProcMethods()
        //{
        //    _dbContextFinder.LoadDbContextTypes(_dllFile);

        //    while (_dbContextFinder.GetNextDbContext(_connectionString, out DbContext dbContext))
        //    {
        //        TestDbContext(dbContext);
        //    }
        //}
        public void TestAssemblyDbContexts(string dllFile)
        {
            _dbContextFinder.LoadDbContextTypes(dllFile);

            while (_dbContextFinder.GetNextDbContext(_connectionString, out DbContext dbContext))
            {
                TestDbContext(dbContext);
            }
        }
Esempio n. 2
0
        public void GivenAnEnumeratorWithTypesInheritingFromDbContext_WhenGettingADbContext_ItShouldReturnADbContext()
        {
            _dbContextFinderToTest.LoadDbContextTypes(_dllPath);

            DbContext resultContext;

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

            Assert.True(result);
            Assert.NotNull(resultContext);
        }
        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);
        }