GenerateValidValue() private method

private GenerateValidValue ( decimal overridingMinValue, decimal overridingMaxValue ) : decimal
overridingMinValue decimal
overridingMaxValue decimal
return decimal
 public void Test_GenerateValue_WhenDecimal_ShouldSet()
 {
     Type propertyType = typeof(decimal);
     IPropDef def = new PropDefFake {
         PropertyType = propertyType
     };
     ValidValueGenerator valueGenerator = new ValidValueGeneratorDecimal(def);
     object value = valueGenerator.GenerateValidValue();
     Assert.IsNotNull(value);
     Assert.IsInstanceOf(typeof(decimal), value);
     Assert.AreNotEqual(valueGenerator.GenerateValidValue(), value);
 }
 public void Test_GenerateValue_WhenDecimapAndRule_ShouldRetValidValue()
 {
     IPropDef def = new PropDefFake {
         PropertyType = typeof(decimal)
     };
     def.AddPropRule(CreatePropRuleDecimal(3.01M, 7.0004M));
     ValidValueGenerator generator = new ValidValueGeneratorDecimal(def);
     Assert.AreSame(typeof(decimal), def.PropertyType);
     Assert.IsNotEmpty(def.PropRules.OfType<PropRuleDecimal>().ToList());
     PropRuleDecimal propRule = def.PropRules.OfType<PropRuleDecimal>().First();
     Assert.AreEqual(3.01M, propRule.MinValue);
     Assert.AreEqual(7.0004M, propRule.MaxValue);
     decimal value = (decimal) generator.GenerateValidValue();
     Assert.IsNotNull(value);
     Assert.GreaterOrEqual(value, 3.01M);
     Assert.LessOrEqual(value, 7.0004M);
 }