private void PerformImportFromZip( string sourceFilename, string destinationRootPath, string destinationServerUrl, IReportServerWriter writer, IBundleReader zipBundleReader, IItemImporter <DataSourceItem> dataSourceItemImporter, IItemImporter <FolderItem> folderItemImporter, IItemImporter <ReportItem> reportItemImporter, IFileSystem fileSystem) { DataSourceEditForm dataSourceEditForm = this.mKernel.Get <DataSourceEditForm>(); ImportZipForm importzipForm = new ImportZipForm( sourceFilename, destinationRootPath, destinationServerUrl, dataSourceEditForm, zipBundleReader, writer, this.mLoggerFactory, dataSourceItemImporter, folderItemImporter, reportItemImporter, fileSystem); importzipForm.DebugForm = this.mDebugForm; importzipForm.Show(); }
public void TestFixtureSetUp() { outputPath = Properties.Settings.Default.DestinationPath; SetupReportItems(); writer = TestKernel.Instance.Get <IReportServerWriter>("2005-DEST"); }
public void TestFixtureSetUp() { outputPath = Properties.Settings.Default.DestinationPath; SetupReportItems(); writer = TestKernel.Instance.Get<IReportServerWriter>("2005-DEST"); }
public ImportZipForm( string sourceFileName, string destinationRootPath, string destinationServerUrl, IBundleReader bundleReader, IReportServerWriter writer, ILoggerFactory loggerFactory, IItemImporter<DataSourceItem> dataSourceItemImporter, IItemImporter<FolderItem> folderItemImporter, IItemImporter<ReportItem> reportItemImporter, IFileSystem fileSystem) { if (string.IsNullOrEmpty(sourceFileName)) throw new ArgumentException("sourceFileName"); if (string.IsNullOrEmpty(destinationRootPath)) throw new ArgumentException("destinationRootPath"); if (string.IsNullOrEmpty(destinationServerUrl)) throw new ArgumentException("destinationServerUrl"); if (bundleReader == null) throw new ArgumentNullException("bundleReader"); if (writer == null) throw new ArgumentNullException("writer"); if (loggerFactory == null) throw new ArgumentNullException("loggerFactory"); if (dataSourceItemImporter == null) throw new ArgumentNullException("dataSourceItemImporter"); if (folderItemImporter == null) throw new ArgumentNullException("folderItemImporter"); if (reportItemImporter == null) throw new ArgumentNullException("reportItemImporter"); if (fileSystem == null) throw new ArgumentNullException("fileSystem"); InitializeComponent(); this.mSourceFileName = sourceFileName; this.mDestinationRootPath = destinationRootPath; this.mDestinationServerUrl = destinationServerUrl; this.mBundleReader = bundleReader; this.mReportServerWriter = writer; this.mLoggerFactory = loggerFactory; this.mLogger = this.mLoggerFactory.GetCurrentClassLogger(); this.mDataSourceItemImporter = dataSourceItemImporter; this.mFolderItemImporter = folderItemImporter; this.mReportItemImporter = reportItemImporter; this.mFileSystem = fileSystem; this.mSummaryForm = new SummaryForm(); }
private void PerformDirectMigrate( string sourceServerUrl, string sourceRootPath, string destinationServerUrl, string destinationRootPath, IReportServerReader reader, IReportServerWriter writer, PythonEngine engine) { DataSourceEditForm dataSourceEditForm = this.mKernel.Get <DataSourceEditForm>(); //TODO This is dumb. Should be resolving all of the forms from the IoC kernel but I don't feel like refactoring atm... MigrateForm migrateForm = new MigrateForm( sourceRootPath, sourceServerUrl, destinationRootPath, destinationServerUrl, dataSourceEditForm, reader, writer, this.mLoggerFactory, engine); // If 'Execute Script' is checked, load script if (chkExecuteScript.Checked) { try { string scriptFile = txtScriptPath.Text; mLogger.Info("Loading script '{0}'...", scriptFile); migrateForm.LoadScript(scriptFile); mLogger.Info("Script '{0}' loaded!", scriptFile); } catch (Exception er) { mLogger.Error(er, "Error loading script"); MessageBox.Show(er.Message, "Error Loading Script", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } } migrateForm.DebugForm = this.mDebugForm; migrateForm.Show(); }
public PythonEngine( IReportServerReader reportServerReader, IReportServerWriter reportServerWriter, IReportServerRepository reportServerRepository, IFileSystem fileSystem, ILogger logger, ILogger scriptLogger) { if (reportServerReader == null) { throw new ArgumentNullException("reportServerReader"); } if (reportServerWriter == null) { throw new ArgumentNullException("reportServerWriter"); } if (reportServerRepository == null) { throw new ArgumentNullException("reportServerRepository"); } if (fileSystem == null) { throw new ArgumentNullException("fileSystem"); } if (logger == null) { throw new ArgumentNullException("logger"); } if (scriptLogger == null) { throw new ArgumentNullException("scriptLogger"); } this.mReportServerReader = reportServerReader; this.mReportServerWriter = reportServerWriter; this.mReportServerRepository = reportServerRepository; this.mFileSystem = fileSystem; this.mLogger = logger; this.mScriptLogger = scriptLogger; this.mAppDomain = AppDomain.CreateDomain("sandbox"); this.mScriptEngine = Python.CreateEngine(); this.mScriptEngine.Runtime.ImportModule("clr"); this.mEnginePath = Environment.CurrentDirectory; }
public void TestFixtureSetUp() { outputPath = Properties.Settings.Default.DestinationPath; rootFolderItem = new FolderItem() { Name = string.Format("{0}", outputPath.Replace("/", "")), Path = string.Format("{0}", outputPath) }; reportsFolderItem = new FolderItem() { Name = "Reports", Path = string.Format("{0}/Reports", outputPath) }; reportsSubFolderItem = new FolderItem() { Name = "Sub Folder", Path = string.Format("{0}/Reports/Sub Folder", outputPath) }; rootSubFolderItem = new FolderItem() { Name = "Data Sources", Path = string.Format("{0}/Data Sources", outputPath) }; alreadyExistsFolderItem = new FolderItem() { Name = "Folder Already Exists", Path = "/SSRSMigrate_AW_Tests_Exists/Folder Already Exists" }; invalidPathFolderItem = new FolderItem() { Name = "SSRSMigrate_AW_Tests.Tests", Path = "/SSRSMigrate_AW.Tests", }; folderItems = new List <FolderItem>() { rootFolderItem, reportsFolderItem, reportsSubFolderItem, rootSubFolderItem, }; writer = TestKernel.Instance.Get <IReportServerWriter>("2010-DEST"); }
public MigrateForm( string sourceRootPath, string sourceServerUrl, string destinationRootPath, string destinationServerUrl, IReportServerReader reader, IReportServerWriter writer, ILoggerFactory loggerFactory) { if (string.IsNullOrEmpty(sourceRootPath)) throw new ArgumentException("sourceRootPath"); if (string.IsNullOrEmpty(sourceServerUrl)) throw new ArgumentException("sourceServerUrl"); if (string.IsNullOrEmpty(destinationServerUrl)) throw new ArgumentException("destinationServerUrl"); if (string.IsNullOrEmpty(sourceServerUrl)) throw new ArgumentException("sourceServerUrl"); if (reader == null) throw new ArgumentNullException("reader"); if (writer == null) throw new ArgumentNullException("writer"); if (loggerFactory == null) throw new ArgumentNullException("loggerFactory"); InitializeComponent(); this.mSourceRootPath = sourceRootPath; this.mSourceServerUrl = sourceServerUrl; this.mDestinationRootPath = destinationRootPath; this.mDestinationServerUrl = destinationServerUrl; this.mReportServerReader = reader; this.mReportServerWriter = writer; this.mLoggerFactory = loggerFactory; this.mLogger = mLoggerFactory.GetCurrentClassLogger(); this.mLogger.Info("sourceRootPath: {0}", this.mSourceRootPath); this.mLogger.Info("sourceServerUrl: {0}", this.mSourceServerUrl); this.mLogger.Info("destinationRootPath: {0}", this.mDestinationRootPath); this.mLogger.Info("destinationServerUrl: {0}", this.mDestinationServerUrl); this.mSummaryForm = new SummaryForm(); }
private void ImportFromZip_Connection() { // Save configuration this.Save_DestinationConfiguration(); this.Save_ImportZipConfiguration(); IReportServerWriter writer = null; IBundleReader zipBundleReader = null; IItemImporter <DataSourceItem> dataSourceItemImporter = null; IItemImporter <FolderItem> folderItemImporter = null; IItemImporter <ReportItem> reportItemImporter = null; IFileSystem fileSystem = null; // Test the destination connection this.TestDestinationConnection(true); string version = this.GetDestinationServerVersion(); writer = this.mKernel.Get <IReportServerWriter>(version); writer.Overwrite = this.cbkDestOverwrite.Checked; zipBundleReader = this.mKernel.Get <IBundleReader>(); // Set properties for IBundleReader zipBundleReader.UnPackDirectory = this.GetTempExtractPath(); zipBundleReader.ArchiveFileName = this.txtImportZipFilename.Text; dataSourceItemImporter = this.mKernel.Get <DataSourceItemImporter>(); folderItemImporter = this.mKernel.Get <FolderItemImporter>(); reportItemImporter = this.mKernel.Get <ReportItemImporter>(); fileSystem = this.mKernel.Get <IFileSystem>(); this.PerformImportFromZip( this.txtImportZipFilename.Text, this.txtDestPath.Text, this.txtDestUrl.Text, writer, zipBundleReader, dataSourceItemImporter, folderItemImporter, reportItemImporter, fileSystem ); }
private void PerformImportFromZip( string sourceFilename, string destinationRootPath, string destinationServerUrl, IReportServerWriter writer, IBundleReader zipBundleReader, IItemImporter<DataSourceItem> dataSourceItemImporter, IItemImporter<FolderItem> folderItemImporter, IItemImporter<ReportItem> reportItemImporter, IFileSystem fileSystem) { ImportZipForm importzipForm = new ImportZipForm( sourceFilename, destinationRootPath, destinationServerUrl, zipBundleReader, writer, this.mLoggerFactory, dataSourceItemImporter, folderItemImporter, reportItemImporter, fileSystem); importzipForm.DebugForm = this.mDebugForm; importzipForm.Show(); }
private void PerformDirectMigrate( string sourceServerUrl, string sourceRootPath, string destinationServerUrl, string destinationRootPath, IReportServerReader reader, IReportServerWriter writer) { MigrateForm migrateForm = new MigrateForm( sourceRootPath, sourceServerUrl, destinationRootPath, destinationServerUrl, reader, writer, this.mLoggerFactory); migrateForm.DebugForm = this.mDebugForm; migrateForm.Show(); }
public void TestFixtureSetUp() { outputPath = Properties.Settings.Default.DestinationPath; // Setup DataSourceItems dataSourceItems = new List <DataSourceItem>() { new DataSourceItem() { Description = null, Name = "AWDataSource", Path = string.Format("{0}/Data Sources/AWDataSource", outputPath), ConnectString = "Data Source=(local)\\SQL2008;Initial Catalog=AdventureWorks2008", CredentialsRetrieval = "Integrated", Enabled = true, EnabledSpecified = true, Extension = "SQL", ImpersonateUser = false, ImpersonateUserSpecified = true, OriginalConnectStringExpressionBased = false, Password = null, Prompt = "Enter a user name and password to access the data source:", UseOriginalConnectString = false, UserName = null, WindowsCredentials = false }, new DataSourceItem() { Description = null, Name = "Test Data Source", Path = string.Format("{0}/Data Sources/Test Data Source", outputPath), ConnectString = "Data Source=(local)\\SQL2008;Initial Catalog=AdventureWorks2008", CredentialsRetrieval = "Integrated", Enabled = true, EnabledSpecified = true, Extension = "SQL", ImpersonateUser = false, ImpersonateUserSpecified = true, OriginalConnectStringExpressionBased = false, Password = null, Prompt = "Enter a user name and password to access the data source:", UseOriginalConnectString = false, UserName = null, WindowsCredentials = false } }; // To test invalid path invalidPathDataSourceItem = new DataSourceItem() { Description = null, Name = "Test.Data Source", Path = string.Format("{0}/Data Sources/Test.Data Source", outputPath), ConnectString = "Data Source=(local)\\SQL2008;Initial Catalog=AdventureWorks2008", CredentialsRetrieval = "Integrated", Enabled = true, EnabledSpecified = true, Extension = "SQL", ImpersonateUser = false, ImpersonateUserSpecified = true, OriginalConnectStringExpressionBased = false, Password = null, Prompt = "Enter a user name and password to access the data source:", UseOriginalConnectString = false, UserName = null, WindowsCredentials = false }; alreadyExistsDataSourceItem = new DataSourceItem() { Description = null, Name = "Data Source Already Exists", Path = string.Format("{0}/Data Sources/Data Source Already Exists", outputPath), ConnectString = "Data Source=(local)\\SQL2008;Initial Catalog=AdventureWorks2008", CredentialsRetrieval = "Integrated", Enabled = true, EnabledSpecified = true, Extension = "SQL", ImpersonateUser = false, ImpersonateUserSpecified = true, OriginalConnectStringExpressionBased = false, Password = null, Prompt = "Enter a user name and password to access the data source:", UseOriginalConnectString = false, UserName = null, WindowsCredentials = false }; nullNameDataSourceItem = new DataSourceItem() { Description = null, Name = null, Path = string.Format("{0}/Data Sources/Test Data Source", outputPath), ConnectString = "Data Source=(local)\\SQL2008;Initial Catalog=AdventureWorks2008", CredentialsRetrieval = "Integrated", Enabled = true, EnabledSpecified = true, Extension = "SQL", ImpersonateUser = false, ImpersonateUserSpecified = true, OriginalConnectStringExpressionBased = false, Password = null, Prompt = "Enter a user name and password to access the data source:", UseOriginalConnectString = false, UserName = null, WindowsCredentials = false }; emptyNameDataSourceItem = new DataSourceItem() { Description = null, Name = null, Path = string.Format("{0}/Data Sources/Test Data Source", outputPath), ConnectString = "Data Source=(local)\\SQL2008;Initial Catalog=AdventureWorks2008", CredentialsRetrieval = "Integrated", Enabled = true, EnabledSpecified = true, Extension = "SQL", ImpersonateUser = false, ImpersonateUserSpecified = true, OriginalConnectStringExpressionBased = false, Password = null, Prompt = "Enter a user name and password to access the data source:", UseOriginalConnectString = false, UserName = null, WindowsCredentials = false }; nullPathDataSourceItem = new DataSourceItem() { Description = null, Name = "Test Data Source", Path = null, ConnectString = "Data Source=(local)\\SQL2008;Initial Catalog=AdventureWorks2008", CredentialsRetrieval = "Integrated", Enabled = true, EnabledSpecified = true, Extension = "SQL", ImpersonateUser = false, ImpersonateUserSpecified = true, OriginalConnectStringExpressionBased = false, Password = null, Prompt = "Enter a user name and password to access the data source:", UseOriginalConnectString = false, UserName = null, WindowsCredentials = false }; emptyPathDataSourceItem = new DataSourceItem() { Description = null, Name = "Test Data Source", Path = "", ConnectString = "Data Source=(local)\\SQL2008;Initial Catalog=AdventureWorks2008", CredentialsRetrieval = "Integrated", Enabled = true, EnabledSpecified = true, Extension = "SQL", ImpersonateUser = false, ImpersonateUserSpecified = true, OriginalConnectStringExpressionBased = false, Password = null, Prompt = "Enter a user name and password to access the data source:", UseOriginalConnectString = false, UserName = null, WindowsCredentials = false }; writer = TestKernel.Instance.Get <IReportServerWriter>("2005-DEST"); }
public void TestFixtureTearDown() { writer = null; }
public void TestFixtureSetUp() { outputPath = Properties.Settings.Default.DestinationPath; rootFolderItem = new FolderItem() { Name = string.Format("{0}", outputPath.Replace("/", "")), Path = string.Format("{0}", outputPath) }; reportsFolderItem = new FolderItem() { Name = "Reports", Path = string.Format("{0}/Reports", outputPath) }; reportsSubFolderItem = new FolderItem() { Name = "Sub Folder", Path = string.Format("{0}/Reports/Sub Folder", outputPath) }; rootSubFolderItem = new FolderItem() { Name = "Data Sources", Path = string.Format("{0}/Data Sources", outputPath) }; alreadyExistsFolderItem = new FolderItem() { Name = "Folder Already Exists", Path = "/SSRSMigrate_AW_Tests_Exists/Folder Already Exists" }; invalidPathFolderItem = new FolderItem() { Name = "SSRSMigrate_AW_Tests.Tests", Path = "/SSRSMigrate_AW.Tests", }; folderItems = new List<FolderItem>() { rootFolderItem, reportsFolderItem, reportsSubFolderItem, rootSubFolderItem, }; writer = TestKernel.Instance.Get<IReportServerWriter>("2010-DEST"); }
public MigrateForm( string sourceRootPath, string sourceServerUrl, string destinationRootPath, string destinationServerUrl, DataSourceEditForm dataSourceEditForm, IReportServerReader reader, IReportServerWriter writer, ILoggerFactory loggerFactory, PythonEngine pythonEngine) { if (string.IsNullOrEmpty(sourceRootPath)) { throw new ArgumentException("sourceRootPath"); } if (string.IsNullOrEmpty(sourceServerUrl)) { throw new ArgumentException("sourceServerUrl"); } if (string.IsNullOrEmpty(destinationServerUrl)) { throw new ArgumentException("destinationServerUrl"); } if (string.IsNullOrEmpty(sourceServerUrl)) { throw new ArgumentException("sourceServerUrl"); } if (dataSourceEditForm == null) { throw new ArgumentNullException("dataSourceEditForm"); } if (reader == null) { throw new ArgumentNullException("reader"); } if (writer == null) { throw new ArgumentNullException("writer"); } if (loggerFactory == null) { throw new ArgumentNullException("loggerFactory"); } if (pythonEngine == null) { throw new ArgumentNullException("pythonEngine"); } InitializeComponent(); this.mSourceRootPath = sourceRootPath; this.mSourceServerUrl = sourceServerUrl; this.mDestinationRootPath = destinationRootPath; this.mDestinationServerUrl = destinationServerUrl; this.mDataSourceEditForm = dataSourceEditForm; this.mReportServerReader = reader; this.mReportServerWriter = writer; this.mLoggerFactory = loggerFactory; this.mEngine = pythonEngine; this.mLogger = mLoggerFactory.GetCurrentClassLogger(); this.mLogger.Info("sourceRootPath: {0}", this.mSourceRootPath); this.mLogger.Info("sourceServerUrl: {0}", this.mSourceServerUrl); this.mLogger.Info("destinationRootPath: {0}", this.mDestinationRootPath); this.mLogger.Info("destinationServerUrl: {0}", this.mDestinationServerUrl); this.mSummaryForm = new SummaryForm(); }
public ImportZipForm( string sourceFileName, string destinationRootPath, string destinationServerUrl, DataSourceEditForm dataSourceEditForm, IBundleReader bundleReader, IReportServerWriter writer, ILoggerFactory loggerFactory, IItemImporter <DataSourceItem> dataSourceItemImporter, IItemImporter <FolderItem> folderItemImporter, IItemImporter <ReportItem> reportItemImporter, IFileSystem fileSystem) { if (string.IsNullOrEmpty(sourceFileName)) { throw new ArgumentException("sourceFileName"); } if (string.IsNullOrEmpty(destinationRootPath)) { throw new ArgumentException("destinationRootPath"); } if (string.IsNullOrEmpty(destinationServerUrl)) { throw new ArgumentException("destinationServerUrl"); } if (dataSourceEditForm == null) { throw new ArgumentNullException("dataSourceEditForm"); } if (bundleReader == null) { throw new ArgumentNullException("bundleReader"); } if (writer == null) { throw new ArgumentNullException("writer"); } if (loggerFactory == null) { throw new ArgumentNullException("loggerFactory"); } if (dataSourceItemImporter == null) { throw new ArgumentNullException("dataSourceItemImporter"); } if (folderItemImporter == null) { throw new ArgumentNullException("folderItemImporter"); } if (reportItemImporter == null) { throw new ArgumentNullException("reportItemImporter"); } if (fileSystem == null) { throw new ArgumentNullException("fileSystem"); } InitializeComponent(); this.mSourceFileName = sourceFileName; this.mDestinationRootPath = destinationRootPath; this.mDestinationServerUrl = destinationServerUrl; this.mDataSourceEditForm = dataSourceEditForm; this.mBundleReader = bundleReader; this.mReportServerWriter = writer; this.mLoggerFactory = loggerFactory; this.mLogger = this.mLoggerFactory.GetCurrentClassLogger(); this.mDataSourceItemImporter = dataSourceItemImporter; this.mFolderItemImporter = folderItemImporter; this.mReportItemImporter = reportItemImporter; this.mFileSystem = fileSystem; this.mSummaryForm = new SummaryForm(); }
private void DirectMigration_Connection() { // Save configuration this.Save_SourceConfiguration(); this.Save_DestinationConfiguration(); IReportServerReader reader = null; IReportServerWriter writer = null; string srcVersion = "2005-SRC"; string destVersion = "2005-SRC"; if (this.cboSrcVersion.SelectedIndex > this.cboDestVersion.SelectedIndex) { throw new Exception("Source server is newer than destination server."); } if (this.cboSrcVersion.SelectedIndex == 0) { srcVersion = "2005-SRC"; } else { srcVersion = "2010-SRC"; } if (this.cboDestVersion.SelectedIndex == 0) { destVersion = "2005-DEST"; } else { destVersion = "2010-DEST"; } // If source server is the same as the destination server and the root paths are the same, throw exception if (this.txtSrcUrl.Text.ToLower() == this.txtDestUrl.Text.ToLower() && this.txtSrcPath.Text.ToLower() == this.txtDestPath.Text.ToLower()) { throw new Exception("You cannot migrate to the same path on the same server."); } // Test the source connection this.TestSourceConnection(true); // Test the destination connection this.TestDestinationConnection(true); reader = this.mKernel.Get <IReportServerReader>(srcVersion); writer = this.mKernel.Get <IReportServerWriter>(destVersion); // Check source and destination server versions through the reader and writer SSRSVersion sourceVersion = reader.GetSqlServerVersion(); SSRSVersion destinationVersion = writer.GetSqlServerVersion(); // If the destination version is older than the source version, prevent migration. if ((int)destinationVersion < (int)sourceVersion) { throw new Exception("Destination server is using an older version of SQL Server than the source server."); } writer.Overwrite = this.cbkDestOverwrite.Checked; // Resolve PythonEngine from kernel PythonEngine engine = this.mKernel.Get <PythonEngine>(destVersion); this.PerformDirectMigrate( this.txtSrcUrl.Text, this.txtSrcPath.Text, this.txtDestUrl.Text, this.txtDestPath.Text, reader, writer, engine); }
public void TestFixtureSetUp() { outputPath = Properties.Settings.Default.DestinationPath; // Setup DataSourceItems dataSourceItems = new List<DataSourceItem>() { new DataSourceItem() { Description = null, Name = "AWDataSource", Path = string.Format("{0}/Data Sources/AWDataSource", outputPath), ConnectString = "Data Source=(local)\\SQL2008;Initial Catalog=AdventureWorks2008", CredentialsRetrieval ="Integrated", Enabled = true, EnabledSpecified = true, Extension = "SQL", ImpersonateUser = false, ImpersonateUserSpecified = true, OriginalConnectStringExpressionBased = false, Password = null, Prompt = "Enter a user name and password to access the data source:", UseOriginalConnectString = false, UserName = null, WindowsCredentials = false }, new DataSourceItem() { Description = null, Name = "Test Data Source", Path = string.Format("{0}/Data Sources/Test Data Source", outputPath), ConnectString = "Data Source=(local)\\SQL2008;Initial Catalog=AdventureWorks2008", CredentialsRetrieval ="Integrated", Enabled = true, EnabledSpecified = true, Extension = "SQL", ImpersonateUser = false, ImpersonateUserSpecified = true, OriginalConnectStringExpressionBased = false, Password = null, Prompt = "Enter a user name and password to access the data source:", UseOriginalConnectString = false, UserName = null, WindowsCredentials = false } }; // To test invalid path invalidPathDataSourceItem = new DataSourceItem() { Description = null, Name = "Test.Data Source", Path = string.Format("{0}/Data Sources/Test.Data Source", outputPath), ConnectString = "Data Source=(local)\\SQL2008;Initial Catalog=AdventureWorks2008", CredentialsRetrieval = "Integrated", Enabled = true, EnabledSpecified = true, Extension = "SQL", ImpersonateUser = false, ImpersonateUserSpecified = true, OriginalConnectStringExpressionBased = false, Password = null, Prompt = "Enter a user name and password to access the data source:", UseOriginalConnectString = false, UserName = null, WindowsCredentials = false }; alreadyExistsDataSourceItem = new DataSourceItem() { Description = null, Name = "Data Source Already Exists", Path = string.Format("{0}/Data Sources/Data Source Already Exists", outputPath), ConnectString = "Data Source=(local)\\SQL2008;Initial Catalog=AdventureWorks2008", CredentialsRetrieval = "Integrated", Enabled = true, EnabledSpecified = true, Extension = "SQL", ImpersonateUser = false, ImpersonateUserSpecified = true, OriginalConnectStringExpressionBased = false, Password = null, Prompt = "Enter a user name and password to access the data source:", UseOriginalConnectString = false, UserName = null, WindowsCredentials = false }; nullNameDataSourceItem = new DataSourceItem() { Description = null, Name = null, Path = string.Format("{0}/Data Sources/Test Data Source", outputPath), ConnectString = "Data Source=(local)\\SQL2008;Initial Catalog=AdventureWorks2008", CredentialsRetrieval = "Integrated", Enabled = true, EnabledSpecified = true, Extension = "SQL", ImpersonateUser = false, ImpersonateUserSpecified = true, OriginalConnectStringExpressionBased = false, Password = null, Prompt = "Enter a user name and password to access the data source:", UseOriginalConnectString = false, UserName = null, WindowsCredentials = false }; emptyNameDataSourceItem = new DataSourceItem() { Description = null, Name = null, Path = string.Format("{0}/Data Sources/Test Data Source", outputPath), ConnectString = "Data Source=(local)\\SQL2008;Initial Catalog=AdventureWorks2008", CredentialsRetrieval = "Integrated", Enabled = true, EnabledSpecified = true, Extension = "SQL", ImpersonateUser = false, ImpersonateUserSpecified = true, OriginalConnectStringExpressionBased = false, Password = null, Prompt = "Enter a user name and password to access the data source:", UseOriginalConnectString = false, UserName = null, WindowsCredentials = false }; nullPathDataSourceItem = new DataSourceItem() { Description = null, Name = "Test Data Source", Path = null, ConnectString = "Data Source=(local)\\SQL2008;Initial Catalog=AdventureWorks2008", CredentialsRetrieval = "Integrated", Enabled = true, EnabledSpecified = true, Extension = "SQL", ImpersonateUser = false, ImpersonateUserSpecified = true, OriginalConnectStringExpressionBased = false, Password = null, Prompt = "Enter a user name and password to access the data source:", UseOriginalConnectString = false, UserName = null, WindowsCredentials = false }; emptyPathDataSourceItem = new DataSourceItem() { Description = null, Name = "Test Data Source", Path = "", ConnectString = "Data Source=(local)\\SQL2008;Initial Catalog=AdventureWorks2008", CredentialsRetrieval = "Integrated", Enabled = true, EnabledSpecified = true, Extension = "SQL", ImpersonateUser = false, ImpersonateUserSpecified = true, OriginalConnectStringExpressionBased = false, Password = null, Prompt = "Enter a user name and password to access the data source:", UseOriginalConnectString = false, UserName = null, WindowsCredentials = false }; writer = TestKernel.Instance.Get<IReportServerWriter>("2005-DEST"); }