C# Class Habanero.Testability.ValidValueGeneratorDate

Generates a valid value for PropDef of type DateTime.
Inheritance: ValidValueGenerator, IValidValueGeneratorNumeric
Show file Open project: Chillisoft/habanero.testability Class Usage Examples

Public Methods

Method Description
GenerateValidValue ( ) : object

Generates a valid value taking into account only the IPropRules. I.e. any InterPropRules will not be taken into account. The IValidValueGeneratorNumeric's methods are used by the BOTestFactory to create valid values taking into account InterPropRules

GenerateValidValueGreaterThan ( object minValue ) : object

Generates a Valid Value taking IPropRule and minValue into account.

GenerateValidValueLessThan ( object maxValue ) : object

Generates a Valid Value taking IPropRule and maxValue into account.

ValidValueGeneratorDate ( IPropDef propDef ) : Habanero.Base

Construct a Valid Value Generator with a PropDef

Private Methods

Method Description
GenerateValidValue ( System.DateTime overridingMinValue, System.DateTime overridingMaxValue ) : System.DateTime
GetMaxValue ( IPropRuleComparable propRule, System.DateTime overridingMaxValue ) : System.DateTime
GetMinValue ( IPropRuleComparable propRule, System.DateTime overridingMinValue ) : System.DateTime

Method Details

GenerateValidValue() public method

Generates a valid value taking into account only the IPropRules. I.e. any InterPropRules will not be taken into account. The IValidValueGeneratorNumeric's methods are used by the BOTestFactory to create valid values taking into account InterPropRules
public GenerateValidValue ( ) : object
return object

GenerateValidValueGreaterThan() public method

Generates a Valid Value taking IPropRule and minValue into account.
public GenerateValidValueGreaterThan ( object minValue ) : object
minValue object
return object

GenerateValidValueLessThan() public method

Generates a Valid Value taking IPropRule and maxValue into account.
public GenerateValidValueLessThan ( object maxValue ) : object
maxValue object
return object

ValidValueGeneratorDate() public method

Construct a Valid Value Generator with a PropDef
public ValidValueGeneratorDate ( IPropDef propDef ) : Habanero.Base
propDef IPropDef
return Habanero.Base