About
This blog is mostly about my work, but expect an occasional home project, productivity tip and tooling review.Search
Categories
- Conference (21)
- Development (217)
- Security (19)
- Test (32)
- Tooling (175)
- Uncategorized (168)
Most used tags
Tag Archives: Rhino mocks
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 design pattern, isolation, random, Rhino mocks, stub, unittest, wrapper
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
Implement Interface as virtual methods
A best pratice in Object Oriented Programming is the use of Interfaces. When applied correctly it simplifies unit testing. But watch out for the pitfall of default implementation by Visual Studio. Below is an example how this can bite you. … Continue reading
AmbiguousMatchException on mock creation
See simple code below of ClassToTest with two public constructors with one parameter. My favorite mocking framework (Rhino Mocks) is unable to determine which constructor to use for mocking. The CreatePartialMock method throws an AmbiguousMatchException. The workaround for this is … Continue reading
Windows Azure SDK better with wrappers
Since Windows Azure SDK 1.2 back in 2010 I’m trying to get my unittests up and running. I posted about it on the Microsoft forum and consulted the JustMock forum. Nobody was able to provide the solution as it looks … Continue reading
Posted in Development
Tagged azure, decouple, fakes, interface, reference, Rhino mocks, RoleEnvironment, RoleEnvironmentHelper, singleton, telerik, Telerik JustMock, unittest, vs11, Windows Azure, windows azure sdk, wrapper
Leave a comment