Beispiel #1
0
        protected override void SetUp()
        {
            base.SetUp();

            _database = GetCleanedServer(FAnsi.DatabaseType.MicrosoftSQLServer);
            _function.Create(_database, CatalogueRepository);
        }
Beispiel #2
0
        public void TestPreExecutionChecker_TableIsTableValuedFunction()
        {
            TestableTableValuedFunction f = new TestableTableValuedFunction();

            f.Create(DiscoveredDatabaseICanCreateRandomTablesIn, CatalogueRepository);

            var tbl = f.TableInfoCreated.Discover(DataAccessContext.DataLoad);

            Assert.IsTrue(tbl.Exists());

            var lmd     = RdmpMockFactory.Mock_LoadMetadataLoadingTable(f.TableInfoCreated);
            var checker = new PreExecutionChecker(lmd, new HICDatabaseConfiguration(DiscoveredDatabaseICanCreateRandomTablesIn.Server));
            var ex      = Assert.Throws <Exception>(() => checker.Check(new ThrowImmediatelyCheckNotifier()));

            StringAssert.IsMatch("Table '.*MyAwesomeFunction.*' is a TableValuedFunction", ex.Message);
        }
Beispiel #3
0
 public void CreateFunction()
 {
     _function.Create(GetCleanedServer(DatabaseType.MicrosoftSQLServer), CatalogueRepository);
 }
Beispiel #4
0
 private void CreateFunction(ICatalogueRepository repo)
 {
     _function = new TestableTableValuedFunction();
     _function.Create(GetCleanedServer(FAnsi.DatabaseType.MicrosoftSQLServer), repo);
 }
Beispiel #5
0
 public void CreateFunction()
 {
     _function.Create(DiscoveredDatabaseICanCreateRandomTablesIn, CatalogueRepository);
 }
Beispiel #6
0
 private void CreateFunction(ICatalogueRepository repo)
 {
     _function = new TestableTableValuedFunction();
     _function.Create(DiscoveredDatabaseICanCreateRandomTablesIn, repo);
 }