MoQ now uses xUnit for its unit tests

After talking to a few guys during the MVP summit and the proceedings of the ALT.NET conference, I decided to give xUnit a serious try.

I'm quite pleased with it. Using .NET idioms rather than excessive attributes (i.e. [SetUp] vs class constructor, [TearDown] vs IDisposable, etc.) is a good thing.

"Upgrading" was quite easy: for the most part, it was a search & replace of:

  • [Test] => [Fact]
  • [SetUp] => ""
  • [TearDown] => ""
  • Assert.That => Assert.True
  • Assert.Fail => Assert.True(false, ...

Read full article

No Comments