public static ModerateClass CreateForTests(int seed) { var moderateClass = new ModerateClass(seed, seed % 2 == 1, "seed_" + seed); moderateClass.FieldPublic = seed; moderateClass.FieldPublic2 = seed + 1; //moderateClass.StructField = new Struct(seed, moderateClass, SimpleClass.CreateForTests(seed)); moderateClass.DeeperStructField = new DeeperStruct(seed, SimpleClass.CreateForTests(seed)); moderateClass.GenericClassField = new GenericClass <SimpleClass>(moderateClass, SimpleClass.CreateForTests(seed)); var seedSimple = seed + 1000; moderateClass.SimpleClassProperty = new SimpleClass(seedSimple, seed % 2 == 1, "seed_" + seedSimple); moderateClass.ReadonlySimpleClassField = new SimpleClass(seedSimple + 1, seed % 2 == 1, "seed_" + (seedSimple + 1)); moderateClass.SimpleClassArray = new SimpleClass[10]; for (int i = 1; i <= 10; i++) { moderateClass.SimpleClassArray[i - 1] = new SimpleClass(seedSimple + i, seed % 2 == 1, "seed_" + (seedSimple + i)); } return(moderateClass); }
protected override int InitData(int iT) { arrS.Clear(); arrC.Clear(); for (int i = 0; i < iT; i++) { arrS.Add(SimpleClass.CreateForTests(i)); arrC.Add(ComplexClass.CreateForTests()); } return(1); }