I’ve already blogged previously about the new Shim Library of Visual Studio 2012 Using Shims in Visual Studio to test untestable code Shim and InstanceBehavior fallthrough to isolate part of the SUT. Now it is time to explore another scenario where shim can save your life. Suppose you are working with Hardware, Es. a barcode [...]

Continue reading about Shim constructors to isolate “Future Objects”

I’ve dealt in a previous post with the new Shim library in Vs11 that permits you to test “difficult to test code” and I showed a really simple example on how to use Shim to isolate the call to DateTime.Now to simulate passing time in a Unit Test. Now I want to change a little [...]

Continue reading about Shim and InstanceBehavior fallthrough to isolate part of the SUT

TrafficLight Experiment. Advantage of DDD approach to the problem Traffic Light, say goodbye to public properties It is a long time I did not post about simple Traffic Light experiment. I’ve ended with a super simple Domain with no Getters and no Setters, but there is still something I really do not like about that [...]

Continue reading about Traffic light vNext

I always strive myself to write testable code, but it is not always easy, especially if you do not follow TDD red-green-refactor mantra. Code written without Unit Testing in mind is usually not so easy to test and when is time to modify code written by other, if you want to create a safety net [...]

Continue reading about Using Shims in Visual Studio 11 to test untestable code.

I’ve blogged in the past various solution to run NUnit tests during a TFS build, and now it is time to make it again for TFS11, but this time it is incredibly simple, because the new Test Runner supports multiple frameworks, so it works almost automatically. You can read from Peter Provost blog that actually [...]

Continue reading about Running NUnit and xUnit tests in TFS11 build