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();
        }
Пример #2
0
 public void Setup()
 {
     scope       = new TransactionScope();
     dbUnderTest = new SqlTestTarget("testTarget");
 }