Assert.AreEqual in MSTest – done right

Every unit testing framework out there comes with a plethora of assertion methods - this is not necessarily a good thing. Instead of writing simple code a developer is forced to choose the correct assertion method from a seemingly endless list of methods, most of which look exactly the same! Having multiple overloaded methods with … Continue reading Assert.AreEqual in MSTest – done right

New Pluralsight course: Advanced C++ Mocking Using Google Mock

My latest course: Advanced C++ Mocking Using Google Mock was published during the weekend. After finishing my very first Pluralsight course I knew I want to author another one. I've been working with C++, Java and .NET developers for the last five years, teaching about clean code, design patterns and unit testing. I've seen good developers struggle with TDD, … Continue reading New Pluralsight course: Advanced C++ Mocking Using Google Mock

VS2015 Update 1 brings (back) parallel test execution

Yesterday I’ve installed the new VS2015 update and tried to make my machine talk to my win10 (IoT core) Raspberry PI. It didn’t help but that’s a story for another blog post – spoiler: it was a problem with my laptops Ethernet port.After the dust settled I’ve started reading about the new goodness that was … Continue reading VS2015 Update 1 brings (back) parallel test execution

Faking a long running asynchronous call

A few days ago I needed to make sure that a specific method would only get called once no matter how many times it’s caller is invoked. The simplified code looked something like this:public async Task CallLongOperation(){ var result = await _client.LongWebCall(); if (result.Failed) { // log failure and exit } }I needed to make … Continue reading Faking a long running asynchronous call