-
Notifications
You must be signed in to change notification settings - Fork 19
Reporting
Robert Wagner edited this page Nov 10, 2016
·
5 revisions
The Beyond Compare and KDiff diff tools are supported out of the box. See below how to add your own. If you have time, please submit a PR with your new reporter.
The reporter behaviour can also be modified to use something other than
a diff tool (for example a logger) by implementing IReporter
:
class LogReporter : IReporter
{
public void Report(string recieved, string approved)
{
Log.Warning("Expected {recieved}, Got {approved}", recieved, approved);
}
}
configuration.UsingReporter(new LogReporter());
Instead of implementing IReporter
, simple reporters can be specified using a delegate. For example:
configuration.UsingReporter(
(recieved, approved) =>
Log.Warning("Expected {recieved}, Got {approved}", recieved, approved)
);
New diff programs can be added or the order thereof changed by
passing a new instance of DiffReporter
:
var programs = new[] {
new AnotherDiffProgram()
}
.Concat(DiffReporter.DefaultDiffPrograms)
.ToArray();
var reporter = new DiffReporter(programs);
configuration.UsingReporter(reporter);