public void GetDataSources() { string path = "/SSRSMigrate_AW_Tests"; List <DataSourceItem> actual = reader.GetDataSources(path); Assert.AreEqual(expectedDataSourceItems.Count(), actual.Count()); }
public void ExportDataSources() { reader.GetDataSources("/SSRSMigrate_AW_Tests", GetDataSources_Reporter); foreach (DataSourceItem actualDataSourceItem in actualDataSourceItems) { string saveFilePath = outputPath + SSRSUtil.GetServerPathToPhysicalPath(actualDataSourceItem.Path, "json"); ExportStatus actualStatus = dataSourceExporter.SaveItem( actualDataSourceItem, saveFilePath, true); // Export was successful Assert.True(actualStatus.Success, string.Format("Success; {0}", actualDataSourceItem.Path)); // Was exported to the expected location Assert.AreEqual(saveFilePath, actualStatus.ToPath, string.Format("ToPath; {0}", actualDataSourceItem.Path)); // Was exported from the expected location Assert.AreEqual(actualDataSourceItem.Path, actualStatus.FromPath, string.Format("ToPath; {0}", actualDataSourceItem.Path)); // The exported DataSourceItem exists on disk Assert.True(File.Exists(actualStatus.ToPath)); } }