public void DirCompare_OneEmpty() { AssemblyComparer ac = new AssemblyComparer(); AssemblyComparison results = ac.CompareAssemblyDirectories(false, DiffConfig.Default, ComparisonFilter.Default, Subjects.DirOne, Subjects.DirEmpty); // Two assemblies present in just one directories Assert.AreEqual(2, results.Groups.Count); Assert.AreEqual(1, results.Groups[0].Assemblies.Count); Assert.AreEqual(1, results.Groups[1].Assemblies.Count); }
static int Main(string[] arguments) { foreach (TraceListener tl in Trace.Listeners) { if (tl is RelayingTraceListener) { ((RelayingTraceListener)tl).Message += new EventHandler<TraceEventArgs>(Program_Message); } } Log.Info("BitDiffer Console"); Log.Info("Version {0} ({1:d})", Assembly.GetExecutingAssembly().GetName().Version, DateTime.Today); Log.Info(""); ProgramArguments args = new ProgramArguments(); try { args.Parse(true, arguments); } catch (ArgumentParserException ex) { string message = "ERROR: " + ex.Message; if (args.LogFile != null) { File.WriteAllText(args.LogFile, message); } Console.WriteLine(message); Console.WriteLine(); Usage(); return -1; } if (args.Help) { Usage(); Console.WriteLine("Press any key to exit..."); Console.Read(); return 1; } if (args.LogFile != null) { _logFileWriter = new StreamWriter(args.LogFile, false); } AssemblyComparison ac = new AssemblyComparer().CompareAssemblies(args.ComparisonSet); ac.WriteReport(args.ReportFile, AssemblyComparisonXmlWriteMode.Normal); if (args.RawFile != null) { ac.WriteXmlReport(args.RawFile, AssemblyComparisonXmlWriteMode.Raw); } Log.Info("Done!"); if (_logFileWriter != null) { _logFileWriter.Flush(); _logFileWriter.Close(); } return 0; }
private static List<AssemblyDetail> DoCompare(DiffConfig config) { AssemblyComparison ac = new AssemblyComparer().CompareAssemblyFiles(config, ComparisonFilter.Default, Subjects.One, Subjects.Two); Assert.AreEqual(1, ac.Groups.Count); return ac.Groups[0].Assemblies; }
private static AssemblyComparison DoCompare(ComparisonFilter filter) { AssemblyComparison ac = new AssemblyComparer().CompareAssemblyFiles(DiffConfig.Default, filter, Subjects.One, Subjects.Two); Assert.AreEqual(1, ac.Groups.Count); Assert.AreEqual(2, ac.Groups[0].Assemblies.Count); return ac; }