/AssertMessage

Add 'message' parameter to Assertions. Nunit, Mstest, Xunit is supported.

Primary LanguageC#MIT LicenseMIT

This is an add-in for Fody

Icon

Adds 'message' parameter to Assertions. It is generated from source code.

Supported frameworks:

  • Nunit
  • Mstest
  • Xunit

Introduction to Fody.

The nuget package NuGet Status

https://nuget.org/packages/AssertMessage.Fody/

PM> Install-Package AssertMessage.Fody

Your Code

public void CustomerTest()
{
    var expectedCustomer = new Customer();
    var actualCustomer = new Customer();
    ...
    Assert.AreEqual(expectedCustomer.Money, actualCustomer.Money);
}

What gets compiled

public void CustomerTest()
{
    var expectedCustomer = new Customer();
    var actualCustomer = new Customer();
    ...
    Assert.AreEqual(expectedCustomer.Money, actualCustomer.Money, "Assert.AreEqual(expectedCustomer.Money, actualCustomer.Money);");
}

Pdb files

The Pbd files are required for this plugin. To make it work in Release, please enable Debug Info(pdbonly) in Advanced Build Settings Dialog Box. More info

Icon

Message by Prerak Patel from The Noun Project