コード例 #1
0
        private DateTime GenerateValidValue(DateTime?overridingMinValue, DateTime?overridingMaxValue)
        {
            PropRuleDate propRule    = base.GetPropRule <PropRuleDate>();
            DateTime     intMinValue = GetMinValue(propRule, overridingMinValue);
            DateTime     intMaxValue = GetMaxValue(propRule, overridingMaxValue);

            return(RandomValueGen.GetRandomDate(intMinValue, intMaxValue));
        }
コード例 #2
0
        /// <summary>
        /// Generates a valid value taking into account only the <see cref="IPropRule"/>s. I.e. any <see cref="InterPropRule"/>s
        /// will not be taken into account. The <see cref="IValidValueGeneratorNumeric"/>'s methods are used
        /// by the BOTestFactory to create valid values taking into account InterPropRules
        /// </summary>
        /// <returns></returns>
        public override object GenerateValidValue()
        {
            PropRuleDate propRule = base.GetPropRule <PropRuleDate>();

            return((propRule == null) ? RandomValueGen.GetRandomDate() : RandomValueGen.GetRandomDate(propRule.MinValue, propRule.MaxValue));
        }