RandomPOCOGenerator is a simple reflection-based tool designed for generating and populating objects with random values
[TestMethod]
public void GenerateTest()
{
RPGenerator gen = new RPGenerator();
int maxRecursionLevel = 4;
var intRes = gen.Generate(maxRecursionLevel);
var stringArrayRes = gen.Generate(maxRecursionLevel);
var charArrayRes = gen.Generate(maxRecursionLevel);
var pocoRes = gen.Generate(maxRecursionLevel);
var structRes = gen.Generate(maxRecursionLevel);
var pocoArray = gen.Generate(maxRecursionLevel);
var listRes = gen.Generate>(maxRecursionLevel);
var dictRes = gen.Generate>>>(maxRecursionLevel);
var parameterlessList = gen.Generate>>(maxRecursionLevel);
// Non-generic Generate
var stringArrayRes = gen.Generate(typeof(string[]), maxRecursionLevel);
var pocoRes = gen.Generate(typeof(SamplePocoClass), maxRecursionLevel);
var structRes = gen.Generate(typeof(SampleStruct), maxRecursionLevel);
Trace.WriteLine("-------------- TEST Results ------------------------");
Trace.WriteLine(string.Format("TotalCountOfGeneratedObjects {0}", gen.TotalCountOfGeneratedObjects));
Trace.WriteLine(string.Format("Generating errors {0}", gen.Errors.Count));
}