Category: Programming

Silverlight 4 is over and out so ‘the dude abides’

Finally Visual Studio 2010 is out and so is the Silverlight 4. I got few complaints that my MVVM demo applications are not working properly for people that have the new Silverlight 4 runtime installed so i updated all the examples so they run properly. Also all solutions files with code are recompiled and checked in final version of VS 2010 so this should run fine now. Expect soon more MVVM goodness on this blog, and until then – just enjoy the spring!  😀

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…

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.