public void TestChainedConversions() { String sourcePath = Path.Combine(this.ResourceDirectory, @"CSV\sample.csv"); String step1Path = Path.Combine(WorkingDirectory, @"step1\sample.cxml"); String step2Path = Path.Combine(WorkingDirectory, @"step2\sample.xlsx"); String step3Path = Path.Combine(WorkingDirectory, @"step3\sample.cxml"); String step4Path = Path.Combine(WorkingDirectory, @"step4\sample.csv"); PauthorProgram.Main(new String[] { "/source", "csv", sourcePath, "/target", "cxml", step1Path }); IPivotCollectionSource source = new CsvCollectionSource(sourcePath); IPivotCollectionSource targetAsSource = new CxmlCollectionSource(step1Path); AssertCxmlSchemaValid(step1Path); AssertCollectionsEqual(source, targetAsSource); PauthorProgram.Main(new String[] { "/source", "cxml", step1Path, "/target", "excel", step2Path }); source = new CxmlCollectionSource(step1Path); targetAsSource = new ExcelCollectionSource(step2Path); AssertCollectionsEqual(source, targetAsSource); PauthorProgram.Main(new String[] { "/source", "excel", step2Path, "/target", "deepzoom", step3Path }); source = new ExcelCollectionSource(step2Path); targetAsSource = new CxmlCollectionSource(step3Path); AssertCxmlSchemaValid(step3Path); AssertCollectionsEqual(source, targetAsSource); PauthorProgram.Main(new String[] { "/source", "deepzoom", step3Path, "/target", "csv", step4Path }); source = new CxmlCollectionSource(step3Path); targetAsSource = new CsvCollectionSource(step4Path); AssertCollectionsEqual(source, targetAsSource); source = new CsvCollectionSource(sourcePath); targetAsSource = new CsvCollectionSource(step4Path); AssertCollectionsEqual(source, targetAsSource); }
public void TestRoundTrip() { String sourcePath = Path.Combine(this.ResourceDirectory, @"Excel\sample.xlsx"); String targetPath = Path.Combine(WorkingDirectory, "sample.xlsx"); ExcelCollectionSource source = new ExcelCollectionSource(sourcePath); ExcelCollectionTarget target = new ExcelCollectionTarget(targetPath); ExcelCollectionSource targetAsSource = new ExcelCollectionSource(targetPath); target.Write(source); AssertCollectionsEqual(source, targetAsSource); }
public void TestExcelToDeepZoom() { String sourcePath = Path.Combine(this.ResourceDirectory, @"Excel\sample.xlsx"); String targetPath = Path.Combine(WorkingDirectory, "sample.cxml"); PauthorProgram.Main(new String[] { "/source", "excel", sourcePath, "/target", "deepzoom", targetPath }); IPivotCollectionSource source = new ExcelCollectionSource(sourcePath); IPivotCollectionSource targetAsSource = new CxmlCollectionSource(targetPath); AssertCxmlSchemaValid(targetPath); AssertCollectionsEqual(source, targetAsSource); AssertFileExists(@"sample.cxml"); AssertFileExists(@"sample_icon.ico"); AssertFileExists(@"sample_deepzoom\sample.dzc"); AssertFileExists(@"sample_deepzoom\sample_files\0\0_0.png"); AssertFileExists(@"sample_deepzoom\0.dzi"); AssertFileExists(@"sample_deepzoom\0_files\0\0_0.png"); }
public void TestCxmlToExcel() { String sourcePath = Path.Combine(this.ResourceDirectory, @"CXML\sample.cxml"); String targetPath = Path.Combine(WorkingDirectory, "sample.xlsx"); PauthorProgram.Main(new String[] { "/source", "cxml", sourcePath, "/target", "excel", targetPath }); IPivotCollectionSource source = new CxmlCollectionSource(sourcePath); IPivotCollectionSource targetAsSource = new ExcelCollectionSource(targetPath); AssertCollectionsEqual(source, targetAsSource); AssertFileExists(@"sample.xlsx"); AssertFileExists(@"sample_icon.ico"); AssertFileExists(@"sample_images\0.png"); }