xUnit Cheat Sheet

About the author

Daniel Marbach


  • Should.codeplex.com is also an option for alternatives to Xunit.Assert (wasnt aware of FluentAssertions) (Think it does Expression rendering too but I could be wrong.

    And I’d make the heading advocacy (not advice!) 😛

    What turned me off is that the ShouldThrow extension on action doesnt map to arrange act assert. I know FA doesnt prevent doing it that way, but the fact its in there means its not in the similar ‘no redundant stuff not everyone needs/wants’ spirit as xunit.

    All debatable though and the bottom line is that I like to make assertions say why the fail (I lean a lot on assert.equal, assert.inrange and friends to achieve…. (yes, and a bit too much on assert.true :P)

By Daniel Marbach

Recent Posts