DEV Community

Cover image for Codinators.XunitHelpers Nuget Package: Update 1
Ankur Sheel
Ankur Sheel

Posted on • Originally published at ankursheel.com on

1

Codinators.XunitHelpers Nuget Package: Update 1

I created Codinators.XunitHelpers(a NuGet package) to add some useful unit testing functionality that is missing in xUnit.

This release adds support for reporting multiple assertion failures in one method in xUnit tests similar to how Nunit does it.

Installation

Install it by using the following command

dotnet add package Codinators.XunitHelpers

Usage

[Fact]
public void MultiAssertTest()
{
    var result = 2 + 2;
    AssertHelper.AssertMultiple(() => Assert.IsType<double>(result),
                                () => Assert.Equal(5, result),
                                () => Assert.Equal(4, result));
}

Screenshot

Screenshot for Multiple Assert Failure

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay