Ejemplo n.º 1
0
        private static IEnumerable <object[]> GetValidTestStructDataForSetValue()
        {
            yield return(new object[] { IntValue, RandomUtil.Randomizer.Next() });

            yield return(new object[] { NestedTestClassValue, NestedTestClassBuilder.Build(RandomUtil.Randomizer.Next()) });

            yield return(new object[] { NestedTestStructValue, NestedTestStructBuilder.Build() });
        }
Ejemplo n.º 2
0
        private static IEnumerable <object[]> GetValidTestClassDataForSetValue()
        {
            yield return(new object[] { ObjectValue, null, false });

            yield return(new object[] { ObjectValue, RandomUtil.Randomizer.Next(), false });

            yield return(new object[] { BoolValue, RandomUtil.Randomizer.NextBool(), false });

            yield return(new object[] { ByteValue, RandomUtil.Randomizer.NextByte(), false });

            yield return(new object[] { SByteValue, RandomUtil.Randomizer.NextSByte(), true });

            yield return(new object[] { CharValue, RandomUtil.Randomizer.NextChar(), false });

            yield return(new object[] { StringValue, RandomUtil.Randomizer.GetString(), false });

            yield return(new object[] { UIntValue, RandomUtil.Randomizer.NextUInt(), false });

            yield return(new object[] { LongValue, RandomUtil.Randomizer.NextLong(), false });

            yield return(new object[] { ULongValue, RandomUtil.Randomizer.NextULong(), false });

            yield return(new object[] { UShortValue, RandomUtil.Randomizer.NextUShort(), false });

            yield return(new object[] { DecimalValue, RandomUtil.Randomizer.NextDecimal(), false });

            yield return(new object[] { DoubleValue, RandomUtil.Randomizer.NextDouble(), false });

            yield return(new object[] { FloatValue, RandomUtil.Randomizer.NextFloat(), false });

            yield return(new object[] { DynamicValue, RandomUtil.Randomizer.NextBool(), false });

            yield return(new object[] { NullableIntValue, null, false });

            yield return(new object[] { NullableIntValue, RandomUtil.Randomizer.Next(), false });

            yield return(new object[] { NullableDateTimeValue, null, true });

            yield return(new object[] { NullableDateTimeValue, DateTime.Now, false });

            yield return(new object[] { EnumValue, RandomUtil.Randomizer.NextEnum <TestEnumeration>(), false });

            yield return(new object[] { TestStructValue, TestStructBuilder.Build(RandomUtil.Randomizer.Next()), false });

            yield return(new object[] { TestStructByteValue, RandomUtil.Randomizer.NextByte(), false });

            yield return(new object[] { TestStructNestedTestClassValue, NestedTestClassBuilder.Build(RandomUtil.Randomizer.Next()), false });

            yield return(new object[] { TestStructNestedTestClassNestedStringValue, RandomUtil.Randomizer.GetString(), false });

            yield return(new object[] { TestStructNestedTestClassPrivateIntValue, RandomUtil.Randomizer.Next(), true });

            yield return(new object[] { TestStructNestedTestStructValue, NestedTestStructBuilder.Build(), true });

            yield return(new object[] { TestStructNestedTestStructNestedCharValue, RandomUtil.Randomizer.NextChar(), false });

            yield return(new object[] { ProtectedNestedTestClassPrivateIntValue, RandomUtil.Randomizer.Next(), true });

            yield return(new object[] { IntCollectionValue, new[] { RandomUtil.Randomizer.Next(), RandomUtil.Randomizer.Next() }, false });

            yield return(new object[] { StaticIntValue, RandomUtil.Randomizer.Next(), false });

            yield return(new object[] { InternalShortValue, RandomUtil.Randomizer.NextShort(), true });

            yield return(new object[] { TestRecordValue, TestRecordBuilder.Build(), false });
        }