Project Description

(Probably) The World's only mocking framework for Windows Phone and Windows Store apps ;)

Available now on NuGet
nugetmoqalate.jpg

PM> Install-Package MoqaLate

http://www.nuget.org/packages/MoqaLate

Windows Phone and Window Store (WinRT) platforms doesn't contain enough reflection support to enable mocking frameworks such as Rhino or Moq to be used.

MoqaLate takes a circuitous route in that it side-steps the reflection problem by building mocks from your interfaces as a post build step.

It generates mocks from any interfaces it finds in your main project and copies them into your test project.

MoqaLate is currently in Alpha, but is usable now. Future versions may generate the mocks differently, etc etc.

Open and Extensible

Generated classes are partial to allow you to add your own custom methods, etc... e.g add a partial class file that contains method to raise one of the interface events.

Generated members are virtual to allow you to create derived mock objects if you want to override how the mock works.

Not Supported:

The following scenarios are not currently supported:
  • 2 or more interfaces with the same name in different namespaces;
  • multiple interface definitions in same file;
  • opening and closing { } must be on separate lines;
  • spaces before line-ending semi-colons: good = Blah(); bad = Blah() ;
  • multiple spaces between interface access modifier and name;
  • tabs separating interface access modifier and interface name;
  • InternalsVisibleTo - all interfaces you want to mock must be public;
  • params keyword in interface method definitions
  • optional parameters in interface method definitions
  • Interface inheritance;
  • Visual Basic;
  • Spaces between multiple generic types: good = <int,bool> bad = <int, bool>
  • Namespace alias;
  • Attributes on interface members;


Last edited Apr 25, 2013 at 8:50 AM by jason_r, version 25