public void Setup()
        {
            ssisdb = new SqlTestTarget("ssisdb");
            ssisdb.ExecuteAdhoc(@"if exists(Select 1 From catalog.projects p 
	                                    join catalog.folders f on p.folder_id = f.folder_id 
	                                    where f.name = 'NewFolder'
	                                    and p.name = 'TestSsisProject')
                                    BEGIN
	                                    exec [catalog].[delete_project] 'NewFolder', 'TestSsisProject';
                                    END

                                    if exists(select * from catalog.environments e
	                                    join catalog.folders f on e.folder_id = f.folder_id
	                                    WHERE f.name = 'NewFolder')
                                    BEGIN
	                                    exec catalog.delete_environment 'NewFolder', 'TestSsisProject';
                                    END

                                    if exists(Select 1 From catalog.folders where name = 'NewFolder')
                                    BEGIN
	                                    exec [catalog].[delete_folder] 'NewFolder';
                                    END

                                    ");
            string exeConfigPath = System.Reflection.Assembly.GetExecutingAssembly().Location;
            var    config        = ConfigurationManager.OpenExeConfiguration(exeConfigPath);

            ssisServer = config.AppSettings.Settings["ssisServer"].Value.ToString();
        }
Esempio n. 2
0
        public void Sql_ExecuteSetup_TableCreated()
        {
            //Create table
            dbUnderTest.ExecuteAdhoc($"Create table test(Id Int);");

            var result = dbUnderTest.GetActual("Select count(*) from Information_Schema.Tables WHERE Table_Name = 'Test'");

            Assert.That(result, Is.EqualTo(1));
        }