Mid Testing

How do NUnit test attributes differ from xUnit’s?

  • NUnit uses [Test] for test methods, whereas xUnit uses [Fact].
  • NUnit uses [SetUp] and [TearDown] for setup and cleanup, while xUnit uses

constructors and IDisposable.

  • NUnit supports [TestCase] for parameterized tests, xUnit uses [Theory] with

[InlineData].

  • NUnit has more built-in attributes like [Category] for grouping tests.

More from C# Programming Tutorial

All questions for this course