예제 #1
0
 public static ComplexStruct Generate()
 {
     return(new ComplexStruct()
     {
         Int = RandGen.GenerateInt(),
         One = ComplexClass.Generate()
     });
 }
예제 #2
0
 public static SimpleStruct Generate()
 {
     return(new SimpleStruct()
     {
         Int = RandGen.GenerateInt(),
         Long = RandGen.GenerateInt(),
         UInt = (uint)RandGen.GenerateInt(min: 0)
     });
 }
예제 #3
0
        public static ComplexClass Generate()
        {
            ComplexClass tmp = new ComplexClass()
            {
                Int = RandGen.GenerateInt()
            };

            tmp.One = tmp;

            return(tmp);
        }
예제 #4
0
 public static SimpleClass Generate()
 {
     return(new SimpleClass()
     {
         BaseInt = RandGen.GenerateInt(),
         Double = RandGen.GenerateInt(),
         Float = RandGen.GenerateInt(),
         Int = RandGen.GenerateInt(),
         Long = RandGen.GenerateInt(),
         String = RandGen.GenerateString(10),
         UInt = (uint)RandGen.GenerateInt(min: 0),
         ULong = (ulong)RandGen.GenerateInt(min: 0)
     });
 }
예제 #5
0
        public static GrandChildClass Generate()
        {
            var grandChild = new GrandChildClass();

            _fields.ForEach(x =>
            {
                if (x.FieldType == _stringType)
                {
                    x.SetValue(grandChild, RandGen.GenerateString(10));
                }
            });

            return(grandChild);
        }