Class Validate
public class Validate : ILib.IValidate
- Inheritance
-
Validate
- Implements
- Inherited Members
Methods
Dc(Pins, bool?, DcOutputMode?, double?, double?, double?, double?, double?, double?, DcMeterMode?, double?, double?, double?, double?, double?, double?, double?, double?, double?, bool?, bool?, double?, double?, double?, double?, double?, bool?, double?, double?)
Validate arguments within Test Method Templates.
public virtual void Dc(Pins pins, bool? gate = null, DcOutputMode? mode = null, double? voltage = null, double? voltageAlt = null, double? current = null, double? voltageRange = null, double? currentRange = null, double? forceBandwidth = null, DcMeterMode? meterMode = null, double? meterVoltageRange = null, double? meterCurrentRange = null, double? meterBandwidth = null, double? sourceFoldLimit = null, double? sinkFoldLimit = null, double? sourceOverloadLimit = null, double? sinkOverloadLimit = null, double? sampleRate = null, double? sampleSize = null, bool? voltageAltOutput = null, bool? bleederResistor = null, double? complianceBoth = null, double? compliancePositive = null, double? complianceNegative = null, double? clampHiV = null, double? clampLoV = null, bool? highAccuracy = null, double? settlingTime = null, double? hardwareAverage = null)
Parameters
pinsPinsPins parameter to be validated.
gatebool?Optional. Gate parameter to be validated.
modeDcOutputMode?Optional. Mode parameter to be validated.
voltagedouble?Optional. Voltage parameter to be validated.
voltageAltdouble?Optional. VoltageAlt parameter to be validated.
currentdouble?Optional. Current parameter to be validated.
voltageRangedouble?Optional. Voltage Range parameter to be validated.
currentRangedouble?Optional. Current Range parameter to be validated.
forceBandwidthdouble?Optional. Force Bandwidth parameter to be validated.
meterModeDcMeterMode?Optional. Meter Mode parameter to be validated.
meterVoltageRangedouble?Optional. Meter Voltage Range parameter to be validated.
meterCurrentRangedouble?Optional. Meter Current Range parameter to be validated.
meterBandwidthdouble?Optional. Meter Bandwidth parameter to be validated.
sourceFoldLimitdouble?Optional. Source Fold Limit parameter to be validated.
sinkFoldLimitdouble?Optional. Sink Fold Limit parameter to be validated.
sourceOverloadLimitdouble?Optional. Source Overload Limit parameter to be validated.
sinkOverloadLimitdouble?Optional. Sink Overload Limit parameter to be validated.
sampleRatedouble?Optional. Sample rate parameter to be validated.
sampleSizedouble?Optional. Sample size parameter to be validated.
voltageAltOutputbool?Optional. Voltage Alt Output parameter to be validated.
bleederResistorbool?Optional. Bleeder Resistor parameter to be validated.
complianceBothdouble?Optional. Compliance Both parameter to be validated.
compliancePositivedouble?Optional. Compliance Positive parameter to be validated.
complianceNegativedouble?Optional. Compliance Negative parameter to be validated.
clampHiVdouble?Optional. Clamp High V parameter to be validated.
clampLoVdouble?Optional. Clamp Low V parameter to be validated.
highAccuracybool?Optional. High Accuracy parameter to be validated.
settlingTimedouble?Optional. Settling Time parameter to be validated.
hardwareAveragedouble?Optional. Hardware Average parameter to be validated.
Enum<T>(string, string, out T)
Checks if the provided string can be parsed to the specified enum type and create the enum value.
public virtual bool Enum<T>(string value, string argumentName, out T enumValue) where T : struct, Enum
Parameters
valuestringThe string to parse for. Case-Insensitive, specify only the enum member part.
argumentNamestringThe argument name used to indicate to IG-XL which test instance parameter failed.
enumValueTThe enumeration value to output in the event that the provided value was successfully parsed in the provided enumeration.
Returns
- bool
true if the
valuewas found within the provided Enumeration and successfully parsed; otherwise, false.
Type Parameters
TThe existing Enumeration to be parsed.
Fail(string, string)
Raises an unconditional validation error.
public virtual void Fail(string problemReasonResolutionMessage, string argumentName)
Parameters
problemReasonResolutionMessagestringValidation failure message clearly describing the problem, reason, and resolution message.
argumentNamestringThe argument name used to indicate to IG-XL which test instance parameter failed.
GetObjectByClassName<T>(string, out T)
Creates an instance of the class passed by its fully-qualified name
public virtual bool GetObjectByClassName<T>(string fullyQualifiedClassName, out T instance) where T : class
Parameters
fullyQualifiedClassNamestringFully qualified name of the class to be instantiated.
instanceTObject to be created if the fullyQualifiedClassName is found to be valid.
Returns
- bool
true if the
fullyqualifiedClassNamewas found to match an existing class and the new object was created; otherwise, false.
Type Parameters
TType of the returned object.
GreaterOrEqual<T>(T, T, string)
Checks if a numeric value is greater or equal to a bound.
public virtual bool GreaterOrEqual<T>(T value, T boundary, string argumentName) where T : IComparable<T>
Parameters
valueTThe value to be checked against the provided boundary.
boundaryTThe boundary that the value must be greater than or equal to.
argumentNamestringThe argument name used to indicate to IG-XL which test instance parameter failed.
Returns
Type Parameters
TThe type specified for the provided parameters.
GreaterThan<T>(T, T, string)
Checks if a numeric value is greater than the provided boundary.
public virtual bool GreaterThan<T>(T value, T boundary, string argumentName) where T : IComparable<T>
Parameters
valueTThe value to be checked against the provided boundary.
boundaryTThe boundary that the value must be greater than.
argumentNamestringThe argument name used to indicate to IG-XL which test instance parameter failed.
Returns
Type Parameters
TThe type specified for the provided parameters.
InRange<T>(T, T, T, string)
Checks if a numeric value is within a range (including).
public virtual bool InRange<T>(T value, T from, T to, string argumentName) where T : IComparable<T>
Parameters
valueTThe value to be checked against the provided upper and lower threshold.
fromTThe lower threshold.
toTThe upper threshold.
argumentNamestringThe argument name used to indicate to IG-XL which test instance parameter failed.
Returns
Type Parameters
TThe type specified for the provided parameters.
IsTrue(bool, string, string)
Checks for whether condition == true.
public virtual bool IsTrue(bool condition, string problemReasonResolutionMessage, string argumentName)
Parameters
conditionboolCondition to be checked.
problemReasonResolutionMessagestringValidation failure message describing the
problem,reason, andresolution.argumentNamestringThe argument name used to indicate to IG-XL which test instance parameter failed.
Returns
LessOrEqual<T>(T, T, string)
Checks if a numeric value is less or equal to a bound.
public virtual bool LessOrEqual<T>(T value, T boundary, string argumentName) where T : IComparable<T>
Parameters
valueTThe value to be checked against the provided boundary.
boundaryTThe boundary that the value must be greater than or equal to.
argumentNamestringThe argument name used to indicate to IG-XL which test instance parameter failed.
Returns
Type Parameters
TThe type specified for the provided parameters.
LessThan<T>(T, T, string)
Checks if a numeric value is less than the provided boundary.
public virtual bool LessThan<T>(T value, T boundary, string argumentName) where T : IComparable<T>
Parameters
valueTThe value to be checked against the provided boundary.
boundaryTThe boundary that the value must be less than.
argumentNamestringThe argument name used to indicate to IG-XL which test instance parameter failed.
Returns
Type Parameters
TThe type specified for the provided parameters.
MultiCondition<T>(string, Func<string, T>, string, out T[], int?)
Checks multi-condition validity and creates the data array.
public virtual bool MultiCondition<T>(string csv, Func<string, T> parser, string argumentName, out T[] conditions, int? referenceCount = null)
Parameters
csvstringComma separated values to split and parse.
parserFunc<string, T>Delegate used to parse comma separated list.
argumentNamestringThe argument name used to indicate to IG-XL which test instance parameter failed.
conditionsT[]Output Array of parsed values sourced from the provided string.
referenceCountint?Optional. If specified, the reference count to verify. Will report an error if the resulting array size is >1 (SingleCondition) and does not match (MultiCondition).
Returns
Type Parameters
TThe target (output) type of the parser function.
MultiCondition<TEnum>(string, string, out TEnum[], int?)
Checks multi-condition validity and creates the data array.
public virtual bool MultiCondition<TEnum>(string csv, string argumentName, out TEnum[] conditions, int? referenceCount = null) where TEnum : struct, Enum
Parameters
csvstringComma separated values to split and parse. Case-Insensitive, specify only the enum member part.
argumentNamestringThe argument name used to indicate to IG-XL which test instance parameter failed.
conditionsTEnum[]Output Array of parsed values sourced from the provided string.
referenceCountint?Optional. If specified, the reference count to verify. Will report an error if the resulting array size is >1 (SingleCondition) and does not match (MultiCondition).
Returns
Type Parameters
TEnum
Pattern(Pattern, string, out List<PatternInfo>, bool)
Checks for valid pattern spec and creates patternInfo object.
public virtual bool Pattern(Pattern pattern, string argumentName, out List<PatternInfo> patternInfo, bool threading = true)
Parameters
patternPatternThe pattern file to check.
argumentNamestringThe argument name used to indicate to IG-XL which test instance parameter failed.
patternInfoList<PatternInfo>A new PatternInfo object list containing the provided patterns.
threadingboolOptional. Indicate whether threading should be used. Validation will fail if threading is not supported by the pattern.
Returns
Pins(PinList, string, out Pins)
Checks for C#RA supported pin spec and creates the object.
public virtual bool Pins(PinList pinList, string argumentName, out Pins pins)
Parameters
pinListPinListargumentNamestringThe argument name used to indicate to IG-XL which test instance parameter failed.
pinsPinsA new Pins object containing all of the resovled pins.