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

Sentry image

Hands-on debugging session: instrument, monitor, and fix

Join Lazar for a hands-on session where you’ll build it, break it, debug it, and fix it. You’ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good ol’ AI to find and fix issues fast.

RSVP here →

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

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

Okay