Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.
/ Diffa Public archive

A lightweight version of ApprovalTests for netstandard projects.

License

Notifications You must be signed in to change notification settings

Ackara/Diffa

Repository files navigation

Diffa

NuGet NuGet

What it is?

Diffa is a unit-test assertion library that allows you to verify your test results against approved files. Inspired by ApprovalTests, Diffa will also automatically launch your favorite diff tool when an assertion fails so you can compare approve the results.

Basic Use

[TestClass]
[Reporter(typeof(DiffReporter))]
[ApprovedFolder("approved-results/")] /* optional */
public class UnitTests
{
    [TestMethod]
    [ApprovedName("9e9516c4-3ed6-449d-b679-cbc858067c6f")] /* optional */
    public void Ensure_results_are_well_formed()
    {
        Diffa.Approve("These are my test results.");
    }
}

Installation

Available at:

NUGET: PM> Install-Package Acklann.Diffa

Contributing