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
Tag: MSTest
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
MSTest V2 – First impressions
It’s been a while since I’ve tried a new Unit Testing framework. It seemed that between NUnit, XUnit & MSTest I had enough to choose from. I’ve always tried to be pragmatic when choosing a test framework for a new project and when suggesting one to a new client. Although all .NET unit testing framework … Continue reading MSTest V2 – First impressions
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
AssertHelper V1 released
Exactly one year and four months passed since my first try at fixing the state of asserts in NUnit. You can read all about it in my post – One assert to rule them all.My intent was to create one assert that would automatically choose the right way to check test result (I didn’t invet … Continue reading AssertHelper V1 released
What I hate about BDD
Disclaimer: this is not a TDD vs. BDD post – now that we’ve got that out of the way let’s discuss the thing I hate most about BDD…I’ve recently started using BDD (again). My tests are still “unit tests” – they do not call a database nor any other external dependency, and since even when … Continue reading What I hate about BDD
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
Test Drive your windows phone application
Today I presented the topic of unit testing (surprise, surprise) and Test Driven Development for windows pone applications. I’d like to thank those who managed to arrive to the meeting despite the weather – it was a pleasure. My talk was at the second part of the meeting - right after Eyal who showed how … Continue reading Test Drive your windows phone application
Enabling parameterized tests in MSTest using PostSharp
I have blogged about the shortcoming of Microsoft’s unit testing framework in the past. It has very good Visual Studio (and TYFS) integration out of the box but it seems that in order to use it I have to suffer lack of functionality I’m used to taking for granted when using any other .NET unit … Continue reading Enabling parameterized tests in MSTest using PostSharp
Three Day TDD .NET Course (Israel)
A new practitioner of TDD and unit tests has much to learn: how to what are acceptance tests? how to write tests that won’t break on every trivial change? what mock objects and why should you care? How do I test my product code? So if you’re looking for a place to learn all those … Continue reading Three Day TDD .NET Course (Israel)