About 1,490,000 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. How do you filter xunit tests by trait with "dotnet test"?

    How do you filter xunit tests by trait with "dotnet test"? Asked 8 years, 9 months ago Modified 4 years, 9 months ago Viewed 27k times

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

  6. Execute unit tests serially (rather than in parallel)

    0 Here is the correct solution for executing unit tests serially. Xunit provides a CollectionBehaviorAttribute class to handle the executing behavior of unit tests. This can help …

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

  8. xUnit - Using WebApplicationFactory with CollectionFixture for …

    Apr 12, 2024 · I have implemented Integration Tests for my .Net Core API using xUnit, shared Class Fixtures, and dependency injection so I can use WebApplicationFactory. public class …

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

    46 In the current version of XUnit (1.5) you can just use Assert.Equal (expected, actual); The above method will do an element by element comparison of the two lists. I'm not sure if this …

  10. Test parameterization in xUnit.net similar to NUnit

    Are there any means in xUnit.net framework similar to the following features of NUnit? [Test, TestCaseSource("CurrencySamples")] public void Format_Currency(decimal value, string …