A couple weeks back I threw out a Teaser about a Silverlight AutoMocker... Here's the follow up I promised.
UPDATE: Moq 3.0 released with full Silverlight support http://moq.me/get
I've been working on this off and on for a while now, and finally decided to sit down and finalize (at least this version) of both Moq for Silverlight and an AutoMocking container backed by the Unity IoC from Microsoft.
This isn't by any means "Official", but probably not far from what will be coming out when it's done...
Below are the necessary steps (I can come up with) to get an official version of Moq.
- We need an "Official" build of the Castle.DynamicProxy2 dependency
- Create NAnt build scripts (Jonathon Rossi said he'd try to work on it this weekend 1/23) Thank God! It tried porting the NAnt build to Silverlight and each of the 3 times I got so lost I gave up... :(
- Fix the Castle.Core-Silverlight build (some changes have occurred to the main without being pushed to the Silverlight Version)
- Create an official binaries of
- Port Moq to Silverlight
- I supplied a patch to Daniel a while ago, but he said he wouldn't include it until #1 above.
But until the official versions become available, here are what I have so far!!!
UPDATE: oops, realized I posted the files below as .7z. You can download and install the free open source zip utility here http://www.7-zip.org/
This contains the Moq, Moq-Contrib (w/unity AutoMocker) source
This contains all the binaries you need to run Moq...
Please keep in mind I'm by no means an IoC pro and the whole AutoMocker was a one afternoon attempt at throwing one together that I could use in Silverlight. It's very basic, but seems to support most of what I need for now.
Could an AutoMocking container backed by Moq and Unity be a project that the community needs?