Quantcast
Channel: NUnit - Thomas Ardal
Browsing latest articles
Browse All 10 View Live

Asserting using Shouldly

I’ve been praising the “new” Assert.That syntax, since introduced in NUnit 2.4. Expressing your tests using a constraint based API, rather than the old Are* and Is* API, makes reading your tests piece...

View Article



Image may be NSFW.
Clik here to view.

Avoid ReSharper warning when doing multiple asserts

Since I started writing my NUnit asserts using Assert.That* instead of Assert.Are*, I’ve been hooked on the new syntax. The constraint API makes asserts readable and helps you specifying the expected...

View Article

Using AutoMoqCustomization with NUnit, Moq and AutoFixture

I’ve used mock as long as I remember (pretty much). I’m a big fan of the whole dependency injection movement and make heavily use of IoC containers. Especially constructor injection turns out to be the...

View Article

Essential c# unit testing tools

During the last 6 years, I’ve preached unit testing to my colleagues and people attending my test-driven development courses. The set of tools I’ve used for this purpose have been stable, for the most...

View Article

Image may be NSFW.
Clik here to view.

Using Moq callbacks as Verify

One thing using Moq always bugged me. When needing to verify some method call, Moq provides a Verify-metod on the Mock object: So, what’s wrong with this piece of code? In fact nothing (if you ask me)....

View Article

Browsing latest articles
Browse All 10 View Live




Latest Images