© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•2y ago•
10 replies
NeotericSh

Extending the Assert class in xunit

I have a method that validates user input and throws an exception if something went wrong. And thought I would extend the Assert class in xunit with a method DoesNotThrow to unit test it. I'm having some problem extending that class and tho that I could ask for help.
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

Assert.Raises<> in xUnit
C#CC# / help
3y ago
xUnit: Can't assert exceptions
C#CC# / help
3y ago
How to fix "Assert.IsAssignableFrom() Failure: Value is null" in Xunit testing?
C#CC# / help
3y ago
Test ASP.API controller with xUnit: can't assert Type
C#CC# / help
3y ago