From: Jehu Galeahsa on 16 May 2010 19:13
A few weeks ago, I started working on a new mock framework, called
Mockina. My goal was to provide a Moq-like interface for mocking
interfaces and classes, but I wanted to provide the exact same syntax
whether you were mocking a public or non-public member. I used .NET
4.0 dynamics to allow lambda syntax for specifying which member to
The project has come quite a ways since I started writing it just a
few weeks ago. It is mature enough at this point (I hope) that I want
to share it. The first thing I need to do is figure out what Im
missing and what is broken. Thats where Id like folks to start
testing it and to share with me the problems.
I am looking for bugs, primarily. However, I am also happy to hear
suggestions for things like: new features, better naming, ease-of-use
and overall code improvements. If youd like to participate, you can
download a copy of Mockina from CodePlex at http://mockina.codeplex.com.
Id truly appreciate your time and criticism.
This project has been mostly a learning experience for me. It really
helped me to dig into the guts of the System.Reflection namespace ,
MSIL and expression trees. Unlike Moq, I didnt use Castle to generate
my mocks for me, so I had to write everything from scratch. Because of
that, there is a good chance you will find bugs or performance issues.
Id love to make Mockina better, so let me know.
I have been using Mockina to help develop some other open source
projects. So far, it has stood up to the test. For my purposes, it
does everything I need it to. I am sure others have more demanding
code. I want to know what it would take to make using Mockina in a
production environment feasible for others.
I am also willing to allow others to join the project in order to make
enhancements as they see fit. Just let me know and we can talk about
setting things up.
I hope that Mockina at a minimum helps others to see how mock
frameworks are written. I did a lot of research to put this project
together, so my hope is that others looking for the same experience
can use Mockina as a starting point.