Project Description
DimMock is an object mocking framework for .NET Framework 4.0 that enables developers to mock simple and mildly complex classes extremely quick.


Now Available Via Nuget
https://nuget.org/packages/DimMock

DimMock is intended as a compliment to other testing frameworks. It is meant to provide a quick way of mocking an object with actual values, without any configuration or injection needed.

example:
Given the following class...
public class Person
{
     public string Name { get; set; }
     public int Number { get; set; }
     public Boolean IsReal { get; set; }
}

You can mock an instance of this class...
Person mockPerson = Mock.Create<Person>(); 

Or you can mock a list of objects, just as easily by simply specifying a range you would like...
List<Person> mocks = Mock.Create<Person>(1, 100);

Here is a quick output result of what was created...
Created 94 mocks.
Printing first 10 mocks...
Mock.Name: 		16BA824
Mock.Number: 		-234508197
Mock.IsReal: 		False

Mock.Name: 		A709D27
Mock.Number: 		642396376
Mock.IsReal: 		False

Mock.Name: 		50AB8A49
Mock.Number: 		1053552266
Mock.IsReal: 		False

Mock.Name: 		FFD2A60C
Mock.Number: 		486955416
Mock.IsReal: 		True

Mock.Name: 		2FD1E8AD
Mock.Number: 		-112468708
Mock.IsReal: 		False

Mock.Name: 		72F225
Mock.Number: 		1968191713
Mock.IsReal: 		False

Mock.Name: 		F8BD6A0B
Mock.Number: 		-1479724442
Mock.IsReal: 		False

Mock.Name: 		EBA93CB6
Mock.Number: 		1487229230
Mock.IsReal: 		False

Mock.Name: 		BE5F122E
Mock.Number: 		139175761
Mock.IsReal: 		True

Mock.Name: 		B2861083
Mock.Number: 		-415910691
Mock.IsReal: 		False

Last edited Jan 24, 2012 at 2:37 AM by votek, version 10