Click here to Skip to main content
12,457,938 members (55,553 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as

Stats

6.7K views
4 bookmarked
Posted

Simple.Mocking - new mocking framework for .NET 3.5

, 29 Nov 2009 CPOL
Rate this:
Please Sign up or sign in to vote.
http://simpled...
http://simpledotnet.codeplex.com/[^]

Tired of unnecessary complex mocking framework with cumbersome record/replay syntax which makes your test code hard to read? Try Simple.Mocking.

* Can mock/fake any interface or delegate
* Refactor friendly syntax, no "magic string" (except for event add/remove)
* No record/replay
* Easy to learn, small API

Example:
var myObject = Mock.Interface<IMyObject>();
 
Expect.Once.MethodCall(() => myObject.MyMethod(Any<int>.Value)).Returns(0);			
 

objectUnderTest.DoSomeThing(myObject);
 

AssertExpectations.IsMetFor(myObject);

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

No Biography provided

You may also be interested in...

Comments and Discussions

 
-- There are no messages in this forum --
| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.160826.1 | Last Updated 29 Nov 2009
Article Copyright 2009 by Mikael Waltersson
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid