public void EndToEndTest() { var result = PackageCompatabilityInvestigator.Create(new NoNugetResultCache()) .Go(new[] { new SourcePackageFile("PackagesConfig", SourcePackageFileReader.PackagesConfig, Encoding.UTF8.GetBytes(PackagesConfig)), new SourcePackageFile("ProjectJson", SourcePackageFileReader.ProjectJson, Encoding.UTF8.GetBytes(ProjectJson)), new SourcePackageFile("Paket", SourcePackageFileReader.Paket, Encoding.UTF8.GetBytes(Paket)) }) .Result; this.Assent(TreeOutputFormatter.Format(result)); }
private static void WriteToOutputFiles(string outputDirectory, InvestigationResult result) { Directory.CreateDirectory(outputDirectory); File.WriteAllLines(Path.Combine(outputDirectory, "Flat.txt"), new[] { FlatListingOutputFormatter.Format(result) }); File.WriteAllLines(Path.Combine(outputDirectory, "Tree.txt"), new[] { TreeOutputFormatter.Format(result) }); File.WriteAllLines(Path.Combine(outputDirectory, "1Level.gv"), new[] { GraphVizOutputFormatter.Format(result, 1) }); File.WriteAllLines(Path.Combine(outputDirectory, "All.gv"), new[] { GraphVizOutputFormatter.Format(result) }); File.WriteAllLines(Path.Combine(outputDirectory, "All.cql"), new[] { CypherOutputFormatter.Format(result) }); foreach (var package in result.PackageConfigResults) { File.WriteAllLines(Path.Combine(outputDirectory, package.PackageName + ".gv"), new[] { GraphVizOutputFormatter.Format(package) }); } System.Console.ForegroundColor = ConsoleColor.Magenta; System.Console.WriteLine($"Output written to {outputDirectory}"); System.Console.ResetColor(); }