About 50 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 should be …

  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 unit te...

  3. 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"?

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

    Is it possible to use Dependency Injection with xUnit? Asked 9 years, 6 months ago Modified 2 years, 1 month ago Viewed 83k times

  5. c# - XUnit how to run both IClassFixture and ICollectionFixture ...

    Mar 26, 2025 · XUnit how to run both IClassFixture and ICollectionFixture - running per class code and per run code Asked 10 months ago Modified 10 months ago Viewed 192 times

  6. 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

  7. dll - Trouble running xunit tests in .net8 - Stack Overflow

    Mar 16, 2024 · In xUnit v3, this can happen if your test project references a library project that makes use of an xUnit type (e.g. TheoryData), and that project in turn references the NuGet package …

  8. How do I skip specific tests in xUnit based on current platform

    I have an assembly that I've built on Windows I want to run the xUnit tests on mono in Linux. However, I have found that while 400 of these tests can run (in order), that certain tests either hang ...

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

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

  10. 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 shows any …