About 52 results
Open links in new tab
  1. c# - xUnit.net: Global setup + teardown? - Stack Overflow

    Oct 19, 2012 · This question is about the unit testing framework xUnit.net. I need to run some code before any test is executed, and also some code after all tests are done. I thought there …

  2. c# - NUnit vs. xUnit - Stack Overflow

    What are the differences between NUnit and xUnit.net? What's the point of developing two of them, not only one? I've read that xUnit is being developed by inventor of NUnit: xUnit.net is a …

  3. Is it possible to use Dependency Injection with xUnit?

    Nuget package First add the following nuget package to your Xunit project: Install-Package Xunit.Microsoft.DependencyInjection Setup your fixture The abstract class of …

  4. Run code once before and after ALL tests in xUnit.net

    Do you mean xUnit as "the generic group of language-specific unit testing tools like JUnit, NUnit, etc." or xUnit as "xUnit.net, the .Net unit testing tool"?

  5. c# - For Xunit 3, when using [assembly: CaptureConsole], does …

    Sep 10, 2025 · For Xunit 3, when using [assembly: CaptureConsole], does that work with parallel tests Asked 4 months ago Modified 4 months ago Viewed 240 times

  6. Visual Studio 2022 not running XUnit tests - Stack Overflow

    Mar 24, 2022 · The xunit.runner.visualstudio package is rather finnicky about the specific versions of Visual Studio and .NET that you're using - unfortunately neither NuGet nor Visual Studio …

  7. c# XUnit Fluent Assertions: Writing unit test case for BadRequest

    Aug 14, 2024 · I'm working on an ASP.NET Core 8 Web API with CQRS mediator pattern and I'm currently creating XUnit tests for all the controllers. Everything's working fine, expect I cannot …

  8. c# - Assert an Exception using XUnit - Stack Overflow

    Jul 10, 2017 · I am a newbie to XUnit and Moq. I have a method which takes string as an argument.How to handle an exception using XUnit. [Fact] public void

  9. c# - xUnit : Assert two List<T> are equal? - Stack Overflow

    New link in comments broken too. Project is now moved to GitHub, but I haven't been able to find that particular source file there either. For complex object don't forget that you need an …

  10. xUnit - Display test names for theory memberdata (TestCase)

    Oct 15, 2017 · I've been using NUnit for testing and I'm really fond of test cases. In NUnit you can easily set each test name in the test case using the SetName function in a TestCaseData …