Test your xUnit knowledge with a free interactive quiz — 20 questions with answers and explanations. No signup needed to play.
Question 1/5Score 0
What is `IClassFixture<T>` used for in xUnit, and what problem does it solve?
Questions in this quiz
What is `IClassFixture<T>` used for in xUnit, and what problem does it solve?
What is `Assert.Throws<T>()` used for in xUnit?
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?
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?
What does `Assert.Equal()` do in xUnit?
What is a reasonable strategy for choosing between using a constructor (per-test setup) versus `IClassFixture<T>` (shared-across-class setup) for a given piece of setup logic in xUnit?
What does `[InlineData]` provide when used with a `[Theory]` test method?
What is the relationship between xUnit and a mocking library like Moq, given that xUnit itself doesn't provide mocking functionality?
What is xUnit (xUnit.net)?
What is `[MemberData]` used for as an alternative to `[InlineData]` in an xUnit `[Theory]` test?
How do you run xUnit tests from the command line for a .NET project?
What attribute marks a simple, parameterless test method in xUnit?