Lately I have been using a standard MSTest project and changing the references 
it uses to sue the Silverlight ones.  This way you can test your VM without the 
test runner and you don't have to change the VM at all.  I also use the SL Unit 
test framework to do my integration testing.

Regards,
Philip Beadle
Readify | Principal Consultant
Suite 408 Life.Lab Building | 198 Harbour Esplanade | Docklands | VIC 3008 | 
Australia
M: +61 417 301 024 | E: 
[email protected]<mailto:[email protected]> | C: 
[email protected]<sip:[email protected]> | W: 
www.readify.net<http://www.readify.net/>

The content of this e-mail, including any attachments is a confidential 
communication between Readify Pty Ltd and the intended addressee and is for the 
sole use of that intended addressee. If you are not the intended addressee, any 
use, interference with, disclosure or copying of this material is unauthorized 
and prohibited. If you have received this e-mail in error please contact the 
sender immediately and then delete the message and any attachment(s).
[cid:[email protected]]<http://readify.net/about-readify/press/readify-makes-2008-mis-strategic-100-list/>

From: [email protected] 
[mailto:[email protected]] On Behalf Of Miguel Madero
Sent: Tuesday, 29 September 2009 12:56 PM
To: [email protected]
Subject: Re: Mocking frameworks...

Hi Stephen,

I've been using MoQ for the Desktop runtime. For the SL runtime I only did 
manual mocking/stubbing/faking/whatever, since until recently there were not 
options.

I really like MoQ and now that it works for SL I'd consider using it, however 
now I'm getting my ViewModels, Converters, etc to compile for the Desktop 
Runtime so I can test them in the build server using MSTest or XUnit instead of 
the Silverlight Test Runner and when it comes to mocking frameworks, I can use 
anything avaialble for the desktop (but I've only used MoQ).

I had a similar issue when I was working with the .NET Compact Framework, there 
was no Test Runner, so we needed to make our model and controllers compile for 
the desktop and run them there. Then we got a test runner from patterns and 
practices, but we never got to integrate it with the build server, when VS08 
came out, we had a new test runner integrated with the IDE, but it was just too 
slow (as well as the one from P&P) that we just got back to running the tests 
in the Desktop Runtime.

There's somethign exciting about seeing your unit tests run in the real device 
(or in the Browser in the case of SL), but after you get over that excitment, 
you just realzie isn't practical (I'm talking mainly for the CF and SL test 
runnner from MS, I'm not sure if the other ones are as good as the desktop ones)

There're some subtle differences that you can encounter when testing in 
different runtimes/oss/environments, so in the CF we tried to keep both test 
projects in sync so when we didn't have time we ran the tests for the desktop 
runtime and eventually we run  the same tests in the CF. However after some 
time we found that this wasn't adding any value for us (apart from some 
umanaged code tests that we couldn't mock) and we decided to have CF tests only 
for thigns with platform dependencies.

Something similar applies for Silverlight, altough I've found that there're way 
less dependencies to the SL Runtime (or are easier to abstract) than what we 
had with the CF. Do you find scenarios where you really need to run your code 
in the SL Runtime? Serialization is one of the few ones that I've found



On Tue, Sep 29, 2009 at 12:17 PM, Stephen Price 
<[email protected]<mailto:[email protected]>> wrote:
Hey all,

I've used a little bit of TypeMock (I have a license) but due to the cost of 
the build server license it's put off projects I'm on from using it. I was just 
wondering what the most popular mocking frameworks out there are. I've used a 
little bit of Rhinomocks for Silverlight, and will be looking at Rhinomocks for 
.net. Not looked at Nmock yet, was wondering what everyone else are using and 
rave about.

thx
Stephen

_______________________________________________
ozsilverlight mailing list
[email protected]<mailto:[email protected]>
http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight



--
Miguel A. Madero Reyes
www.miguelmadero.com<http://www.miguelmadero.com> (blog)
[email protected]<mailto:[email protected]>

<<inline: image001.gif>>

<<inline: image002.png>>

_______________________________________________
ozsilverlight mailing list
[email protected]
http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight

Reply via email to