Tag: TDD

Lighthouse – Silverlight Unit Test Runner Project released

Unit Testing in Silverlight? But you need Web Browser to do that! No you do not! Ok maybe you do. But not in a direct way. I will clarify that later. Lets first go back in time to the root of the story: Since the initial release of Silverlight i was really annoyed by the fact that Unit Testing had very slim support. Even later when Silverlight Unit Testing Framework was introduced by Microsoft things became little better but still it was far from good. You could create Unit Tests, but you had to start your Visual Studio in order Read More

Unit Testable WCF Web Services in MVVM and Silverlight 4

In all my previous MVVM in Silverlight 4 posts i was avoiding to address one painful aspect of the Silverlight: calling WCF Web Services. And it was not without reason. Lets face it, consuming WCF Web Services from your Silverlight application can be pretty hard. I mean hard to do it in a clean way off course. Yes we all know how to create a Silverlight enabled WCF Web Service from Visual Studio but things become messy from that point. First question is how to invoke methods of the web service? Should we use Add Web Service Reference from the Visual Read More

Unit testing and mocking internal interfaces with RhinoMocks

Im not the kind of purist that will avoid unit testing internal classes. If its some very important code i want to test it even if its internal.

Another case when i want to access internal classes is when i want to test some public class that uses some internal classes (via their interfaces).
In this scenario i need to be able to mock those internal interfaces that the public class is using in order to be able to instantiate it and unit test it.