Top "Xunit2" questions

Related to the version 2 of XUnit

Why is the Visual Studio 2015/2017/2019 Test Runner not discovering my xUnit v2 tests

UPDATE: Adding a 2019; the discovery/runner integration mechanism is same as per 2017 & 2015, so the key things that can go …

.net visual-studio unit-testing visual-studio-2015 xunit2
How to implement XUnit descriptive Assert message?

Context in XUnit github I found this: Add Assert.Equal(expected, actual, message) overload #350 (so a developer ask for a …

c# unit-testing xunit assertions xunit2
How do I run specific tests using dotnet test?

I have a large test suite in a .NET Core project. I can use the Test Explorer window to select …

xunit.net .net-core .net-core-rc2 xunit2
MemberData tests show up as one test instead of many

When you use [Theory] together with [InlineData] it will create a test for each item of inline data that is …

c# xunit.net data-driven-tests xunit2
"dotnet test": how to run xunit tests projects in parallel?

I am runnning all tests projects from solution level with a single command: dotnet test how can I make all …

.net testing .net-core xunit xunit2
Collection fixture won't inject

I'm using xUnit 2.0 collection fixtures to share a common database setup/teardown between a number of different test classes. The …

c# xunit.net xunit2
xUnit Assert.All() async

I have this example test using xUnit: [Fact] public void SomeTest() { Assert.All(itemList, async item=> { var i = await …

c# xunit xunit.net xunit2
Unable to get ConfigurationBuilder to read from appsettings.json in xunit class library in ASP.NET Core 1.0 RC2

I am trying to do the following in an XUnit project to get the connectionstring to the database my tests …

asp.net asp.net-core xunit xunit.net xunit2
XUnit Test Constructor dependence injection with Autofac

I am implementing Xunit with Autofac, I could make it work by below code: using (var scoped = DbFixture.Container.Resolve&…

asp.net-core autofac xunit2
Reconfigure dependencies when Integration testing ASP.NET Core Web API and EF Core

I'm following this tutorial Integration Testing with Entity Framework Core and SQL Server My code looks like this Integration Test …

c# asp.net-core integration-testing entity-framework-core xunit2