Here is a draft of my xUnit Cheat sheet
Update: 06.12.2011, added IUseFixture<>
xUnitCheatSheet (Currently V0.2)
Let me know if you have any updates…
Here is a draft of my xUnit Cheat sheet
Update: 06.12.2011, added IUseFixture<>
xUnitCheatSheet (Currently V0.2)
Let me know if you have any updates…
def show IUseFixture (inc a Dispose on the Fixture)
–
perhaps an Assert.InRange example ?
perhaps an Assert.Equal ?
Assert.Throws/DoesNotThrow ?
Nice ideas! Completely forgot IUseFixture. Shame on me! Will update soon
To be honest I should check the comparison sheet on the xunit wiki though as it is the real cheat sheet!
[…] xUnit Cheat Sheet – Daniel Marbach shares his first cut (a 0.1 version) of an xUnit.NET Cheat Sheet exploring the key syntax of the different attributes, interfaces and conventions. […]
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)