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
As feedback to my recent post on Modal Dialogs in MVVM and Silverlight 4 I have received comments that the solution is not easy to Unit Test so i decided to create small blog posts on this subject just to show how simple and clean it is to do this…
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
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.