GenerateValidValueLessThan() public method

public GenerateValidValueLessThan ( object maxValue ) : object
maxValue object
return object
 public void Test_GenerateValueLessThan_WhenDoubleAndRule_WhenRuleMoreRestrictive_ShouldRetValidValue()
 {
     IPropDef def = new PropDefFake {
         PropertyType = typeof(double)
     };
     def.AddPropRule(CreatePropRuleDouble(3.0, 7.0));
     var generator = new ValidValueGeneratorDouble(def);
     Assert.AreSame(typeof(double), def.PropertyType);
     Assert.IsNotEmpty(def.PropRules.OfType<PropRuleDouble>().ToList<PropRuleDouble>());
     var propRule = def.PropRules.OfType<PropRuleDouble>().First<PropRuleDouble>();
     Assert.AreEqual(3.0, propRule.MinValue);
     Assert.AreEqual(7.0, propRule.MaxValue);
     var value = (double) generator.GenerateValidValueLessThan(1.7976931348623157E+308);
     Assert.IsNotNull(value);
     Assert.GreaterOrEqual(value, 3.0);
     Assert.LessOrEqual(value, double.MaxValue);
     Assert.LessOrEqual(value, 7.0);
 }
 public void Test_GenerateValueLessThan_WhenDoubleAndNoRule_ShouldRetValidValue()
 {
     IPropDef def = new PropDefFake {
         PropertyType = typeof(double)
     };
     var generator = new ValidValueGeneratorDouble(def);
     Assert.AreSame(typeof(double), def.PropertyType);
     Assert.IsEmpty(def.PropRules.OfType<PropRuleDouble>().ToList<PropRuleDouble>());
     var value = (double) generator.GenerateValidValueLessThan(-1.7976931348623157E+308);
     Assert.IsNotNull(value);
     Assert.GreaterOrEqual(value, double.MinValue);
     Assert.LessOrEqual(value, double.MinValue);
 }