Mid Testing

What are [Fact] and [Theory] attributes in xUnit?

  • [Fact]: Defines a parameterless test method representing a single test case.
  • [Theory]: Defines a parameterized test that runs multiple times with different data

inputs, provided by [InlineData] or other data sources.

More from C# Programming Tutorial

All questions for this course