Tag Archives: Rhino mocks

Rhino ServiceBus first look

I’m a huge fan of Rhino Mocks and have written about it on this blog. Today I read that Ayende has an implementation for a Service Bus. Like nServicebus but “free”, even Udi Dahan talks about it. This is a … Continue reading

Posted in Development | Tagged , | Leave a comment

Ask google

In my case I ended up on a number of stackoverflow pages. Unit testing error, could not load file or assembly To reproduce a bug I created a unit test with Rhino mocks. The testclass inherited from the testObject which … Continue reading

Posted in Development | Tagged , , , | Leave a comment

Async unit test

With the .NET framework 4.5 making stuff asynchronous has become very easy with async-await. I’ve looked into unit testing this new way of programming and found that Microsoft thought about this too.
During my exercise I had to replace my trusted RhinoMocks by NSubstitute when the tests are run in parallel. Seems that RhinoMocks is not thread safe. More about that in the references. Continue reading

Posted in Development | Tagged , , , | Leave a comment

Async and structuremap

Update to structuremap 3.1 to solve System.MissingMethodException in async unittests. Continue reading

Posted in Development | Tagged , , , | Leave a comment

System.DateTime isolation

After System.Random Isolation I now want to isolate System.DateTime. The information in the struct is not very interesting, but the Now property is. That is a static property. Does that require a different approach? Hardly. IDateTime First I’ll define the … Continue reading

Posted in Test | Tagged , , , , , , , | Leave a comment

System.Random isolation

Writing a unit test is all about isolating the code under test. The best way to do this is by using interfaces. An interface only described the methods and properties, but lets you change the implementation as long as you … Continue reading

Posted in Test | Tagged , , , , , , | 6 Comments

Test async webservice call with a Task

We have a number of services in our project. Our clients include WPF, iOS, Android and Web. To have the best interoperability we communicate over http and expose WSDL for proxy generation. This means we cannot change the contracts or … Continue reading

Posted in Test | Tagged , , , , , | Leave a comment