Test your xUnit knowledge with a free interactive quiz — 20 questions with answers and explanations. No signup needed to play.
Question 1/12Score 0
How do you run xUnit tests from the command line for a .NET project?
In this round
How do you run xUnit tests from the command line for a .NET project?
What is a reasonable use case for `ITestOutputHelper` in xUnit?
What does `[InlineData]` provide when used with a `[Theory]` test method?
What is `[Theory]` used for in xUnit, and how does it differ from `[Fact]`?
What is a "Category"/"Trait" mechanism used for in xUnit (via the `[Trait]` attribute)?
Why does xUnit's constructor-based, new-instance-per-test approach to setup arguably provide stronger test isolation guarantees than a shared-instance-with-[SetUp]-method approach used by some other frameworks?
What is `Assert.Collection()` used for in xUnit, and what advantage does it offer over manually checking a collection's count and then indexing into specific elements?
What is the relationship between xUnit and a mocking library like Moq, given that xUnit itself doesn't provide mocking functionality?
What is `Assert.NotNull()` (and its counterpart `Assert.Null()`) used for in xUnit?
What is `[MemberData]` used for as an alternative to `[InlineData]` in an xUnit `[Theory]` test?
How does the choice between `[Fact]` and `[Theory]` typically relate to test readability and maintenance, when a team has several closely related test scenarios differing only in specific input values?