Class Validate
- Namespace
- Ranorex
- Assembly
- Ranorex.Core.dll
Provides a number of different validation methods.
public static class Validate
- Inheritance
-
Validate
- Inherited Members
Remarks
You can use the following variables in messages you pass to the Validate methods that are replaced by the following values depending on the result of the validation:
| Variable | Value if validation succeeds | Value if the validation fails |
|---|---|---|
| "@ValidateRESULT@" | "succeeded" | "failed" |
| "@ValidateNOT@" | "" | "not " |
| "@ValidateTRUENOT@" | "not " | "" |
bool condition = true;
Validate.IsTrue(condition, "The validation @ValidateRESULT@.");
Fields
DefaultMessage
Use the value of this property to specify that the default validation message should be used.
public static readonly string DefaultMessage
Field Value
Properties
EnableReport
Gets or sets a value indicating whether validations should produce report messages or not.
public static bool EnableReport { get; set; }
Property Value
Methods
AreEqual(object, object)
Validates if the actual value of an object equals an expected value.
public static void AreEqual(object actual, object expected)
Parameters
Exceptions
- ValidationException
If the validation fails.
AreEqual(object, object, string)
Validates if the actual value of an object equals an expected value.
public static void AreEqual(object actual, object expected, string message)
Parameters
actualobjectThe actual value of the object.
expectedobjectThe expected value of the object.
messagestringThe message to log. "{0}" is replaced by the string representation of
actual, "{1}" by the string representation ofexpected.
Exceptions
- ValidationException
If the validation fails.
AreEqual(object, object, string, Options)
Validates if the actual value of an object equals an expected value.
public static bool AreEqual(object actual, object expected, string message, Validate.Options options)
Parameters
actualobjectThe actual value of the object.
expectedobjectThe expected value of the object.
messagestringThe message to log. "{0}" is replaced by the string representation of
actual, "{1}" by the string representation ofexpected.optionsValidate.OptionsAdditional Validate.Options for this validation action.
Returns
- bool
Trueifactualandexpectedare equal; otherwisefalse.
Exceptions
- ValidationException
If the validation fails and
options.ExceptionOnFail istrue.
AreEqual(object, object, string, bool)
Validates if the actual value of an object equals an expected value.
public static bool AreEqual(object actual, object expected, string message, bool exceptionOnFail)
Parameters
actualobjectThe actual value of the object.
expectedobjectThe expected value of the object.
messagestringThe message to log. "{0}" is replaced by the string representation of
actual, "{1}" by the string representation ofexpected.exceptionOnFailboolA value specifying if an exception should be thrown if the validation fails.
Returns
- bool
Trueifactualandexpectedare equal; otherwisefalse.
Exceptions
- ValidationException
If the validation fails and
exceptionOnFailistrue.
AreEqual(string, Regex)
Validates if the given regular expression matches the given string.
public static void AreEqual(string actual, Regex regex)
Parameters
Exceptions
- ValidationException
If the validation fails.
AreEqual(string, Regex, string)
Validates if the given regular expression matches the given string.
public static void AreEqual(string actual, Regex regex, string message)
Parameters
actualstringThe string to match.
regexRegexThe regular expression to match.
messagestringThe message to log. "{0}" is replaced by the string representation of
actual, "{1}" by the string representation ofregex.
Exceptions
- ValidationException
If the validation fails.
AreEqual(string, Regex, string, Options)
Validates if the given regular expression matches the given string.
public static bool AreEqual(string actual, Regex regex, string message, Validate.Options options)
Parameters
actualstringThe string to match.
regexRegexThe regular expression to match.
messagestringThe message to log. "{0}" is replaced by the string representation of
actual, "{1}" by the string representation ofregex.optionsValidate.OptionsAdditional Validate.Options for this validation action.
Returns
- bool
Trueifregexmatchesactual; otherwisefalse.
Exceptions
- ArgumentNullException
If
regexisnull.- ValidationException
If the validation fails and
options.ExceptionOnFail istrue.
AreEqual(string, Regex, string, bool)
Validates if the given regular expression matches the given string.
public static bool AreEqual(string actual, Regex regex, string message, bool exceptionOnFail)
Parameters
actualstringThe string to match.
regexRegexThe regular expression to match.
messagestringThe message to log. "{0}" is replaced by the string representation of
actual, "{1}" by the string representation ofregex.exceptionOnFailboolA value specifying if an exception should be thrown if the validation fails.
Returns
- bool
Trueifregexmatchesactual; otherwisefalse.
Exceptions
- ArgumentNullException
If
regexisnull.- ValidationException
If the validation fails and
exceptionOnFailistrue.
AttributeContains(IElement, string, string)
Validates if the attribute of the specified element contains a specific value.
public static void AttributeContains(IElement element, string name, string value)
Parameters
elementIElementThe element to validate.
namestringThe name of the attribute to validate.
valuestringThe value of the attribute to contain.
Exceptions
- ArgumentNullException
If
valueisnull.- ValidationException
If the validation fails.
AttributeContains(IElement, string, string, string)
Validates if the attribute of the specified element contains a specific value.
public static void AttributeContains(IElement element, string name, string value, string message)
Parameters
elementIElementThe element to validate.
namestringThe name of the attribute to validate.
valuestringThe value of the attribute to contain.
messagestringThe message to log. "{0}" is replaced by the string representation of the
element, "{1}" by the attributename, "{2}" by the string representation of the actual attribute value (or "(not retrieved)" if the attribute could not be retrieved), and "{3}" by the string representation of the expectedvalue.
Exceptions
- ArgumentNullException
If
valueisnull.- ValidationException
If the validation fails.
AttributeContains(IElement, string, string, string, Options)
Validates if the attribute of the specified element contains a specific value.
public static bool AttributeContains(IElement element, string name, string value, string message, Validate.Options options)
Parameters
elementIElementThe element to validate.
namestringThe name of the attribute to validate.
valuestringThe value of the attribute to contain.
messagestringThe message to log. "{0}" is replaced by the string representation of the
element, "{1}" by the attributename, "{2}" by the string representation of the actual attribute value (or "(not retrieved)" if the attribute could not be retrieved), and "{3}" by the string representation of the expectedvalue.optionsValidate.OptionsAdditional Validate.Options for this validation action.
Returns
- bool
Trueif the attribute value contains the specifiedvalue; otherwisefalse.
Exceptions
- ArgumentNullException
If
valueisnull.- ValidationException
If the validation fails and
options.ExceptionOnFail istrue.
AttributeContains(IElement, string, string, string, bool)
Validates if the attribute of the specified element contains a specific value.
public static bool AttributeContains(IElement element, string name, string value, string message, bool exceptionOnFail)
Parameters
elementIElementThe element to validate.
namestringThe name of the attribute to validate.
valuestringThe value of the attribute to contain.
messagestringThe message to log. "{0}" is replaced by the string representation of the
element, "{1}" by the attributename, "{2}" by the string representation of the actual attribute value (or "(not retrieved)" if the attribute could not be retrieved), and "{3}" by the string representation of the expectedvalue.exceptionOnFailboolA value specifying if an exception should be thrown if the validation fails.
Returns
- bool
Trueif the attribute value contains the specifiedvalue; otherwisefalse.
Exceptions
- ArgumentNullException
If
valueisnull.- ValidationException
If the validation fails and
exceptionOnFailistrue.
AttributeContains(RepoItemInfo, string, string)
Validates if the attribute of the element for the specified repository item contains a specific value.
public static void AttributeContains(RepoItemInfo itemInfo, string name, string value)
Parameters
itemInfoRepoItemInfoThe RepoItemInfo object for the repository item.
namestringThe name of the attribute to validate.
valuestringThe value of the attribute to contain.
Exceptions
- ArgumentNullException
If
valueisnull.- ValidationException
If the validation fails.
AttributeContains(RepoItemInfo, string, string, string)
Validates if the attribute of the element for the specified repository item contains a specific value.
public static void AttributeContains(RepoItemInfo itemInfo, string name, string value, string message)
Parameters
itemInfoRepoItemInfoThe RepoItemInfo object for the repository item.
namestringThe name of the attribute to validate.
valuestringThe value of the attribute to contain.
messagestringThe message to log. "{0}" is replaced by the name of the
itemInfoobject, "{1}" by the attributename, "{2}" by the string representation of the actual attribute value (or "(not retrieved)" if the attribute could not be retrieved), and "{3}" by the string representation of the expectedvalue.
Exceptions
- ArgumentNullException
If
valueisnull.- ValidationException
If the validation fails.
AttributeContains(RepoItemInfo, string, string, string, Options)
Validates if the attribute of the element for the specified repository item contains a specific value.
public static bool AttributeContains(RepoItemInfo itemInfo, string name, string value, string message, Validate.Options options)
Parameters
itemInfoRepoItemInfoThe RepoItemInfo object for the repository item.
namestringThe name of the attribute to validate.
valuestringThe value of the attribute to contain.
messagestringThe message to log. "{0}" is replaced by the name of the
itemInfoobject, "{1}" by the attributename, "{2}" by the string representation of the actual attribute value (or "(not retrieved)" if the attribute could not be retrieved), and "{3}" by the string representation of the expectedvalue.optionsValidate.OptionsAdditional Validate.Options for this validation action.
Returns
- bool
Trueif the attribute value contains the specifiedvalue; otherwisefalse.
Exceptions
- ArgumentNullException
If
valueisnull.- ValidationException
If the validation fails and
options.ExceptionOnFail istrue.
AttributeContains(RepoItemInfo, string, string, string, bool)
Validates if the attribute of the element for the specified repository item contains a specific value.
public static bool AttributeContains(RepoItemInfo itemInfo, string name, string value, string message, bool exceptionOnFail)
Parameters
itemInfoRepoItemInfoThe RepoItemInfo object for the repository item.
namestringThe name of the attribute to validate.
valuestringThe value of the attribute to contain.
messagestringThe message to log. "{0}" is replaced by the name of the
itemInfoobject, "{1}" by the attributename, "{2}" by the string representation of the actual attribute value (or "(not retrieved)" if the attribute could not be retrieved), and "{3}" by the string representation of the expectedvalue.exceptionOnFailboolA value specifying if an exception should be thrown if the validation fails.
Returns
- bool
Trueif the attribute value contains the specifiedvalue; otherwisefalse.
Exceptions
- ArgumentNullException
If
valueisnull.- ValidationException
If the validation fails and
exceptionOnFailistrue.
AttributeEqual(IElement, string, object)
Validates if the attribute of the specified element matches a specific value.
public static void AttributeEqual(IElement element, string name, object value)
Parameters
elementIElementThe element to validate.
namestringThe name of the attribute to validate.
valueobjectThe value of the attribute to match.
Exceptions
- ValidationException
If the validation fails.
AttributeEqual(IElement, string, object, string)
Validates if the attribute of the specified element matches a specific value.
public static void AttributeEqual(IElement element, string name, object value, string message)
Parameters
elementIElementThe element to validate.
namestringThe name of the attribute to validate.
valueobjectThe value of the attribute to match.
messagestringThe message to log. "{0}" is replaced by the string representation of the
element, "{1}" by the attributename, "{2}" by the string representation of the actual attribute value (or "(not retrieved)" if the attribute could not be retrieved), and "{3}" by the string representation of the expectedvalue.
Exceptions
- ValidationException
If the validation fails.
AttributeEqual(IElement, string, object, string, Options)
Validates if the attribute of the specified element matches a specific value.
public static bool AttributeEqual(IElement element, string name, object value, string message, Validate.Options options)
Parameters
elementIElementThe element to validate.
namestringThe name of the attribute to validate.
valueobjectThe value of the attribute to match.
messagestringThe message to log. "{0}" is replaced by the string representation of the
element, "{1}" by the attributename, "{2}" by the string representation of the actual attribute value (or "(not retrieved)" if the attribute could not be retrieved), and "{3}" by the string representation of the expectedvalue.optionsValidate.OptionsAdditional Validate.Options for this validation action.
Returns
- bool
Trueif the attribute value matches the specifiedvalue; otherwisefalse.
Exceptions
- ValidationException
If the validation fails and
options.ExceptionOnFail istrue.
AttributeEqual(IElement, string, object, string, bool)
Validates if the attribute of the specified element matches a specific value.
public static bool AttributeEqual(IElement element, string name, object value, string message, bool exceptionOnFail)
Parameters
elementIElementThe element to validate.
namestringThe name of the attribute to validate.
valueobjectThe value of the attribute to match.
messagestringThe message to log. "{0}" is replaced by the string representation of the
element, "{1}" by the attributename, "{2}" by the string representation of the actual attribute value (or "(not retrieved)" if the attribute could not be retrieved), and "{3}" by the string representation of the expectedvalue.exceptionOnFailboolA value specifying if an exception should be thrown if the validation fails.
Returns
- bool
Trueif the attribute value matches the specifiedvalue; otherwisefalse.
Exceptions
- ValidationException
If the validation fails and
exceptionOnFailistrue.
AttributeEqual(RepoItemInfo, string, object)
Validates if the attribute of the element for the specified repository item matches a specific value.
public static void AttributeEqual(RepoItemInfo itemInfo, string name, object value)
Parameters
itemInfoRepoItemInfoThe RepoItemInfo object for the repository item.
namestringThe name of the attribute to validate.
valueobjectThe value of the attribute to match.
Exceptions
- ValidationException
If the validation fails.
AttributeEqual(RepoItemInfo, string, object, string)
Validates if the attribute of the element for the specified repository item matches a specific value.
public static void AttributeEqual(RepoItemInfo itemInfo, string name, object value, string message)
Parameters
itemInfoRepoItemInfoThe RepoItemInfo object for the repository item.
namestringThe name of the attribute to validate.
valueobjectThe value of the attribute to match.
messagestringThe message to log. "{0}" is replaced by the name of the
itemInfoobject, "{1}" by the attributename, "{2}" by the string representation of the actual attribute value (or "(not retrieved)" if the attribute could not be retrieved), and "{3}" by the string representation of the expectedvalue.
Exceptions
- ValidationException
If the validation fails.
AttributeEqual(RepoItemInfo, string, object, string, Options)
Validates if the attribute of the element for the specified repository item matches a specific value.
public static bool AttributeEqual(RepoItemInfo itemInfo, string name, object value, string message, Validate.Options options)
Parameters
itemInfoRepoItemInfoThe RepoItemInfo object for the repository item.
namestringThe name of the attribute to validate.
valueobjectThe value of the attribute to match.
messagestringThe message to log. "{0}" is replaced by the name of the
itemInfoobject, "{1}" by the attributename, "{2}" by the string representation of the actual attribute value (or "(not retrieved)" if the attribute could not be retrieved), and "{3}" by the string representation of the expectedvalue.optionsValidate.OptionsAdditional Validate.Options for this validation action.
Returns
- bool
Trueif the attribute value matches the specifiedvalue; otherwisefalse.
Exceptions
- ValidationException
If the validation fails and
options.ExceptionOnFail istrue.
AttributeEqual(RepoItemInfo, string, object, string, bool)
Validates if the attribute of the element for the specified repository item matches a specific value.
public static bool AttributeEqual(RepoItemInfo itemInfo, string name, object value, string message, bool exceptionOnFail)
Parameters
itemInfoRepoItemInfoThe RepoItemInfo object for the repository item.
namestringThe name of the attribute to validate.
valueobjectThe value of the attribute to match.
messagestringThe message to log. "{0}" is replaced by the name of the
itemInfoobject, "{1}" by the attributename, "{2}" by the string representation of the actual attribute value (or "(not retrieved)" if the attribute could not be retrieved), and "{3}" by the string representation of the expectedvalue.exceptionOnFailboolA value specifying if an exception should be thrown if the validation fails.
Returns
- bool
Trueif the attribute value matches the specifiedvalue; otherwisefalse.
Exceptions
- ValidationException
If the validation fails and
exceptionOnFailistrue.
AttributeNotContains(IElement, string, string)
Validates if the attribute of the specified element does not contain the specific value.
public static void AttributeNotContains(IElement element, string name, string value)
Parameters
elementIElementThe element to validate.
namestringThe name of the attribute to validate.
valuestringThe value of the attribute to contain.
Exceptions
- ArgumentNullException
If
valueisnull.- ValidationException
If the validation fails.
AttributeNotContains(IElement, string, string, string)
Validates if the attribute of the specified element does not contain the specific value.
public static void AttributeNotContains(IElement element, string name, string value, string message)
Parameters
elementIElementThe element to validate.
namestringThe name of the attribute to validate.
valuestringThe value of the attribute to contain.
messagestringThe message to log. "{0}" is replaced by the string representation of the
element, "{1}" by the attributename, "{2}" by the string representation of the actual attribute value (or "(not retrieved)" if the attribute could not be retrieved), and "{3}" by the string representation of the expectedvalue.
Exceptions
- ArgumentNullException
If
valueisnull.- ValidationException
If the validation fails.
AttributeNotContains(IElement, string, string, string, Options)
Validates if the attribute of the specified element does not contain the specific value.
public static bool AttributeNotContains(IElement element, string name, string value, string message, Validate.Options options)
Parameters
elementIElementThe element to validate.
namestringThe name of the attribute to validate.
valuestringThe value of the attribute to contain.
messagestringThe message to log. "{0}" is replaced by the string representation of the
element, "{1}" by the attributename, "{2}" by the string representation of the actual attribute value (or "(not retrieved)" if the attribute could not be retrieved), and "{3}" by the string representation of the expectedvalue.optionsValidate.OptionsAdditional Validate.Options for this validation action.
Returns
- bool
Trueif the attribute value contains the specifiedvalue; otherwisefalse.
Exceptions
- ArgumentNullException
If
valueisnull.- ValidationException
If the validation fails and
options.ExceptionOnFail istrue.
AttributeNotContains(IElement, string, string, string, bool)
Validates if the attribute of the specified element does not contain the specific value.
public static bool AttributeNotContains(IElement element, string name, string value, string message, bool exceptionOnFail)
Parameters
elementIElementThe element to validate.
namestringThe name of the attribute to validate.
valuestringThe value of the attribute to contain.
messagestringThe message to log. "{0}" is replaced by the string representation of the
element, "{1}" by the attributename, "{2}" by the string representation of the actual attribute value (or "(not retrieved)" if the attribute could not be retrieved), and "{3}" by the string representation of the expectedvalue.exceptionOnFailboolA value specifying if an exception should be thrown if the validation fails.
Returns
- bool
Trueif the attribute value contains the specifiedvalue; otherwisefalse.
Exceptions
- ArgumentNullException
If
valueisnull.- ValidationException
If the validation fails and
exceptionOnFailistrue.
AttributeNotContains(RepoItemInfo, string, string)
Validates if the attribute of the element for the specified repository item does not contain the specific value.
public static void AttributeNotContains(RepoItemInfo itemInfo, string name, string value)
Parameters
itemInfoRepoItemInfoThe RepoItemInfo object for the repository item.
namestringThe name of the attribute to validate.
valuestringThe value of the attribute to contain.
Exceptions
- ArgumentNullException
If
valueisnull.- ValidationException
If the validation fails.
AttributeNotContains(RepoItemInfo, string, string, string)
Validates if the attribute of the element for the specified repository item does not contain the specific value.
public static void AttributeNotContains(RepoItemInfo itemInfo, string name, string value, string message)
Parameters
itemInfoRepoItemInfoThe RepoItemInfo object for the repository item.
namestringThe name of the attribute to validate.
valuestringThe value of the attribute to contain.
messagestringThe message to log. "{0}" is replaced by the name of the
itemInfoobject, "{1}" by the attributename, "{2}" by the string representation of the actual attribute value (or "(not retrieved)" if the attribute could not be retrieved), and "{3}" by the string representation of the expectedvalue.
Exceptions
- ArgumentNullException
If
valueisnull.- ValidationException
If the validation fails.
AttributeNotContains(RepoItemInfo, string, string, string, Options)
Validates if the attribute of the element for the specified repository item does not contain the specific value.
public static bool AttributeNotContains(RepoItemInfo itemInfo, string name, string value, string message, Validate.Options options)
Parameters
itemInfoRepoItemInfoThe RepoItemInfo object for the repository item.
namestringThe name of the attribute to validate.
valuestringThe value of the attribute to contain.
messagestringThe message to log. "{0}" is replaced by the name of the
itemInfoobject, "{1}" by the attributename, "{2}" by the string representation of the actual attribute value (or "(not retrieved)" if the attribute could not be retrieved), and "{3}" by the string representation of the expectedvalue.optionsValidate.OptionsAdditional Validate.Options for this validation action.
Returns
- bool
Trueif the attribute value contains the specifiedvalue; otherwisefalse.
Exceptions
- ArgumentNullException
If
valueisnull.- ValidationException
If the validation fails and
options.ExceptionOnFail istrue.
AttributeNotContains(RepoItemInfo, string, string, string, bool)
Validates if the attribute of the element for the specified repository item does not contain the specific value.
public static bool AttributeNotContains(RepoItemInfo itemInfo, string name, string value, string message, bool exceptionOnFail)
Parameters
itemInfoRepoItemInfoThe RepoItemInfo object for the repository item.
namestringThe name of the attribute to validate.
valuestringThe value of the attribute to contain.
messagestringThe message to log. "{0}" is replaced by the name of the
itemInfoobject, "{1}" by the attributename, "{2}" by the string representation of the actual attribute value (or "(not retrieved)" if the attribute could not be retrieved), and "{3}" by the string representation of the expectedvalue.exceptionOnFailboolA value specifying if an exception should be thrown if the validation fails.
Returns
- bool
Trueif the attribute value contains the specifiedvalue; otherwisefalse.
Exceptions
- ArgumentNullException
If
valueisnull.- ValidationException
If the validation fails and
exceptionOnFailistrue.
AttributeNotEqual(IElement, string, object)
Validates if the attribute of the specified element does not match a specific value.
public static void AttributeNotEqual(IElement element, string name, object value)
Parameters
elementIElementThe element to validate.
namestringThe name of the attribute to validate.
valueobjectThe value of the attribute not to match.
Exceptions
- ValidationException
If the validation fails.
AttributeNotEqual(IElement, string, object, string)
Validates if the attribute of the specified element does not match a specific value.
public static void AttributeNotEqual(IElement element, string name, object value, string message)
Parameters
elementIElementThe element to validate.
namestringThe name of the attribute to validate.
valueobjectThe value of the attribute not to match.
messagestringThe message to log. "{0}" is replaced by the string representation of the
element, "{1}" by the attributename, "{2}" by the string representation of the actual attribute value (or "(not retrieved)" if the attribute could not be retrieved), and "{3}" by the string representation of the expectedvalue.
Exceptions
- ValidationException
If the validation fails.
AttributeNotEqual(IElement, string, object, string, Options)
Validates if the attribute of the specified element does not match a specific value.
public static bool AttributeNotEqual(IElement element, string name, object value, string message, Validate.Options options)
Parameters
elementIElementThe element to validate.
namestringThe name of the attribute to validate.
valueobjectThe value of the attribute not to match.
messagestringThe message to log. "{0}" is replaced by the string representation of the
element, "{1}" by the attributename, "{2}" by the string representation of the actual attribute value (or "(not retrieved)" if the attribute could not be retrieved), and "{3}" by the string representation of the expectedvalue.optionsValidate.OptionsAdditional Validate.Options for this validation action.
Returns
- bool
Trueif the attribute value does not match the specifiedvalue; otherwisefalse.
Exceptions
- ValidationException
If the validation fails and
options.ExceptionOnFail istrue.
AttributeNotEqual(IElement, string, object, string, bool)
Validates if the attribute of the specified element does not match a specific value.
public static bool AttributeNotEqual(IElement element, string name, object value, string message, bool exceptionOnFail)
Parameters
elementIElementThe element to validate.
namestringThe name of the attribute to validate.
valueobjectThe value of the attribute not to match.
messagestringThe message to log. "{0}" is replaced by the string representation of the
element, "{1}" by the attributename, "{2}" by the string representation of the actual attribute value (or "(not retrieved)" if the attribute could not be retrieved), and "{3}" by the string representation of the expectedvalue.exceptionOnFailboolA value specifying if an exception should be thrown if the validation fails.
Returns
- bool
Trueif the attribute value does not match the specifiedvalue; otherwisefalse.
Exceptions
- ValidationException
If the validation fails and
exceptionOnFailistrue.
AttributeNotEqual(RepoItemInfo, string, object)
Validates if the attribute of the element for the specified repository item does not match a specific value.
public static void AttributeNotEqual(RepoItemInfo itemInfo, string name, object value)
Parameters
itemInfoRepoItemInfoThe RepoItemInfo object for the repository item.
namestringThe name of the attribute to validate.
valueobjectThe value of the attribute not to match.
Exceptions
- ValidationException
If the validation fails.
AttributeNotEqual(RepoItemInfo, string, object, string)
Validates if the attribute of the element for the specified repository item does not match a specific value.
public static void AttributeNotEqual(RepoItemInfo itemInfo, string name, object value, string message)
Parameters
itemInfoRepoItemInfoThe RepoItemInfo object for the repository item.
namestringThe name of the attribute to validate.
valueobjectThe value of the attribute not to match.
messagestringThe message to log. "{0}" is replaced by the name of the
itemInfoobject, "{1}" by the attributename, "{2}" by the string representation of the actual attribute value (or "(not retrieved)" if the attribute could not be retrieved), and "{3}" by the string representation of the expectedvalue.
Exceptions
- ValidationException
If the validation fails.
AttributeNotEqual(RepoItemInfo, string, object, string, Options)
Validates if the attribute of the element for the specified repository item does not match a specific value.
public static bool AttributeNotEqual(RepoItemInfo itemInfo, string name, object value, string message, Validate.Options options)
Parameters
itemInfoRepoItemInfoThe RepoItemInfo object for the repository item.
namestringThe name of the attribute to validate.
valueobjectThe value of the attribute not to match.
messagestringThe message to log. "{0}" is replaced by the name of the
itemInfoobject, "{1}" by the attributename, "{2}" by the string representation of the actual attribute value (or "(not retrieved)" if the attribute could not be retrieved), and "{3}" by the string representation of the expectedvalue.optionsValidate.OptionsAdditional Validate.Options for this validation action.
Returns
- bool
Trueif the attribute value does not match the specifiedvalue; otherwisefalse.
Exceptions
- ValidationException
If the validation fails and
options.ExceptionOnFail istrue.
AttributeNotEqual(RepoItemInfo, string, object, string, bool)
Validates if the attribute of the element for the specified repository item does not match a specific value.
public static bool AttributeNotEqual(RepoItemInfo itemInfo, string name, object value, string message, bool exceptionOnFail)
Parameters
itemInfoRepoItemInfoThe RepoItemInfo object for the repository item.
namestringThe name of the attribute to validate.
valueobjectThe value of the attribute not to match.
messagestringThe message to log. "{0}" is replaced by the name of the
itemInfoobject, "{1}" by the attributename, "{2}" by the string representation of the actual attribute value (or "(not retrieved)" if the attribute could not be retrieved), and "{3}" by the string representation of the expectedvalue.exceptionOnFailboolA value specifying if an exception should be thrown if the validation fails.
Returns
- bool
Trueif the attribute value does not match the specifiedvalue; otherwisefalse.
Exceptions
- ValidationException
If the validation fails and
exceptionOnFailistrue.
AttributeRegex(IElement, string, Regex)
Validates if the attribute of the specified element matches a specific regular expression.
public static void AttributeRegex(IElement element, string name, Regex regex)
Parameters
elementIElementThe element to validate.
namestringThe name of the attribute to validate.
regexRegexThe regular expression to validate the attribute value string representation against.
Exceptions
- ValidationException
If the validation fails.
AttributeRegex(IElement, string, Regex, string)
Validates if the attribute of the specified element matches a specific regular expression.
public static void AttributeRegex(IElement element, string name, Regex regex, string message)
Parameters
elementIElementThe element to validate.
namestringThe name of the attribute to validate.
regexRegexThe regular expression to validate the attribute value string representation against.
messagestringThe message to log. "{0}" is replaced by the string representation of the
element, "{1}" by the attributename, "{2}" by the string representation of the actual attribute value (or "(not retrieved)" if the attribute could not be retrieved), and "{3}" by the string representation ofregex.
Exceptions
- ValidationException
If the validation fails.
AttributeRegex(IElement, string, Regex, string, Options)
Validates if the attribute of the specified element matches a specific regular expression.
public static bool AttributeRegex(IElement element, string name, Regex regex, string message, Validate.Options options)
Parameters
elementIElementThe element to validate.
namestringThe name of the attribute to validate.
regexRegexThe regular expression to validate the attribute value string representation against.
messagestringThe message to log. "{0}" is replaced by the string representation of the
element, "{1}" by the attributename, "{2}" by the string representation of the actual attribute value (or "(not retrieved)" if the attribute could not be retrieved), and "{3}" by the string representation ofregex.optionsValidate.OptionsAdditional Validate.Options for this validation action.
Returns
- bool
Trueif the specifiedregexmatches the attribute value; otherwisefalse.
Exceptions
- ArgumentNullException
If
regexisnull.- ValidationException
If the validation fails and
options.ExceptionOnFail istrue.
AttributeRegex(IElement, string, Regex, string, bool)
Validates if the attribute of the specified element matches a specific regular expression.
public static bool AttributeRegex(IElement element, string name, Regex regex, string message, bool exceptionOnFail)
Parameters
elementIElementThe element to validate.
namestringThe name of the attribute to validate.
regexRegexThe regular expression to validate the attribute value string representation against.
messagestringThe message to log. "{0}" is replaced by the string representation of the
element, "{1}" by the attributename, "{2}" by the string representation of the actual attribute value (or "(not retrieved)" if the attribute could not be retrieved), and "{3}" by the string representation ofregex.exceptionOnFailboolA value specifying if an exception should be thrown if the validation fails.
Returns
- bool
Trueif the specifiedregexmatches the attribute value; otherwisefalse.
Exceptions
- ArgumentNullException
If
regexisnull.- ValidationException
If the validation fails and
exceptionOnFailistrue.
AttributeRegex(RepoItemInfo, string, Regex)
Validates if the attribute of the element for the specified repository item matches a specific regular expression.
public static void AttributeRegex(RepoItemInfo itemInfo, string name, Regex regex)
Parameters
itemInfoRepoItemInfoThe RepoItemInfo object for the repository item.
namestringThe name of the attribute to validate.
regexRegexThe regular expression to validate the attribute value string representation against.
Exceptions
- ValidationException
If the validation fails.
AttributeRegex(RepoItemInfo, string, Regex, string)
Validates if the attribute of the element for the specified repository item matches a specific regular expression.
public static void AttributeRegex(RepoItemInfo itemInfo, string name, Regex regex, string message)
Parameters
itemInfoRepoItemInfoThe RepoItemInfo object for the repository item.
namestringThe name of the attribute to validate.
regexRegexThe regular expression to validate the attribute value string representation against.
messagestringThe message to log. "{0}" is replaced by the name of the
itemInfoobject, "{1}" by the attributename, "{2}" by the string representation of the actual attribute value (or "(not retrieved)" if the attribute could not be retrieved), and "{3}" by the string representation ofregex.
Exceptions
- ValidationException
If the validation fails.
AttributeRegex(RepoItemInfo, string, Regex, string, Options)
Validates if the attribute of the element for the specified repository item matches a specific regular expression.
public static bool AttributeRegex(RepoItemInfo itemInfo, string name, Regex regex, string message, Validate.Options options)
Parameters
itemInfoRepoItemInfoThe RepoItemInfo object for the repository item.
namestringThe name of the attribute to validate.
regexRegexThe regular expression to validate the attribute value string representation against.
messagestringThe message to log. "{0}" is replaced by the name of the
itemInfoobject, "{1}" by the attributename, "{2}" by the string representation of the actual attribute value (or "(not retrieved)" if the attribute could not be retrieved), and "{3}" by the string representation ofregex.optionsValidate.OptionsAdditional Validate.Options for this validation action.
Returns
- bool
Trueif the specifiedregexmatches the attribute value; otherwisefalse.
Exceptions
- ArgumentNullException
- ValidationException
If the validation fails and
options.ExceptionOnFail istrue.
AttributeRegex(RepoItemInfo, string, Regex, string, bool)
Validates if the attribute of the element for the specified repository item matches a specific regular expression.
public static bool AttributeRegex(RepoItemInfo itemInfo, string name, Regex regex, string message, bool exceptionOnFail)
Parameters
itemInfoRepoItemInfoThe RepoItemInfo object for the repository item.
namestringThe name of the attribute to validate.
regexRegexThe regular expression to validate the attribute value string representation against.
messagestringThe message to log. "{0}" is replaced by the name of the
itemInfoobject, "{1}" by the attributename, "{2}" by the string representation of the actual attribute value (or "(not retrieved)" if the attribute could not be retrieved), and "{3}" by the string representation ofregex.exceptionOnFailboolA value specifying if an exception should be thrown if the validation fails.
Returns
- bool
Trueif the specifiedregexmatches the attribute value; otherwisefalse.
Exceptions
- ValidationException
If the validation fails and
exceptionOnFailistrue.
CompareImage(Element, Bitmap, FindOptions)
Validates if the screenshot of the specified element matches the given image.
public static void CompareImage(Element element, Bitmap image, Imaging.FindOptions findOptions)
Parameters
elementElementThe element to take the screenshot from.
imageBitmapThe image which is compared to the element screenshot.
findOptionsImaging.FindOptionsA Imaging.FindOptions instance that defines the options for the comparison.
Exceptions
- ArgumentNullException
If
imageisnull.- ValidationException
If the validation fails.
CompareImage(Element, Bitmap, FindOptions, string)
Validates if the screenshot of the specified element matches the given image.
public static void CompareImage(Element element, Bitmap image, Imaging.FindOptions findOptions, string message)
Parameters
elementElementThe element to take the screenshot from.
imageBitmapThe image which is compared to the element screenshot.
findOptionsImaging.FindOptionsA Imaging.FindOptions instance that defines the options for the comparison.
messagestringThe message to log. "{0}" is replaced by the string representation of the
element.
Exceptions
- ArgumentNullException
If
imageisnull.- ValidationException
If the validation fails.
CompareImage(Element, Bitmap, FindOptions, string, Options)
Validates if the screenshot of the specified element matches the given image.
public static bool CompareImage(Element element, Bitmap image, Imaging.FindOptions findOptions, string message, Validate.Options options)
Parameters
elementElementThe element to take the screenshot from.
imageBitmapThe image which is compared to the element screenshot.
findOptionsImaging.FindOptionsA Imaging.FindOptions instance that defines the options for the comparison.
messagestringThe message to log. "{0}" is replaced by the string representation of the
element.optionsValidate.OptionsAdditional Validate.Options for this validation action.
Returns
- bool
Trueif the specifiedimagematches the screenshot of theelement; otherwisefalse.
Exceptions
- ArgumentNullException
If
imageisnull.- ValidationException
If the validation fails and
options.ExceptionOnFail istrue.
CompareImage(Element, Bitmap, FindOptions, string, bool)
Validates if the screenshot of the specified element matches the given image.
public static bool CompareImage(Element element, Bitmap image, Imaging.FindOptions findOptions, string message, bool exceptionOnFail)
Parameters
elementElementThe element to take the screenshot from.
imageBitmapThe image which is compared to the element screenshot.
findOptionsImaging.FindOptionsA Imaging.FindOptions instance that defines the options for the comparison.
messagestringThe message to log. "{0}" is replaced by the string representation of the
element.exceptionOnFailboolA value specifying if an exception should be thrown if the validation fails.
Returns
- bool
Trueif the specifiedimagematches the screenshot of theelement; otherwisefalse.
Exceptions
- ArgumentNullException
If
imageisnull.- ValidationException
If the validation fails and
exceptionOnFailistrue.
CompareImage(RepoItemInfo, Bitmap, FindOptions)
Validates if the screenshot of the specified repository item matches the given image.
public static void CompareImage(RepoItemInfo itemInfo, Bitmap image, Imaging.FindOptions findOptions)
Parameters
itemInfoRepoItemInfoThe RepoItemInfo object for the repository item.
imageBitmapThe image which is compared to the item screenshot.
findOptionsImaging.FindOptionsA Imaging.FindOptions instance that defines the options for the comparison.
Exceptions
- ArgumentNullException
If
imageisnull.- ValidationException
If the validation fails.
CompareImage(RepoItemInfo, Bitmap, FindOptions, string)
Validates if the screenshot of the specified repository item matches the given image.
public static void CompareImage(RepoItemInfo itemInfo, Bitmap image, Imaging.FindOptions findOptions, string message)
Parameters
itemInfoRepoItemInfoThe RepoItemInfo object for the repository item.
imageBitmapThe image which is compared to the item screenshot.
findOptionsImaging.FindOptionsA Imaging.FindOptions instance that defines the options for the comparison.
messagestringThe message to log. "{0}" is replaced by the name of the
itemInfoobject.
Exceptions
- ArgumentNullException
If
imageisnull.- ValidationException
If the validation fails.
CompareImage(RepoItemInfo, Bitmap, FindOptions, string, Options)
Validates if the screenshot of the specified repository item matches the given image.
public static bool CompareImage(RepoItemInfo itemInfo, Bitmap image, Imaging.FindOptions findOptions, string message, Validate.Options options)
Parameters
itemInfoRepoItemInfoThe RepoItemInfo object for the repository item.
imageBitmapThe image which is compared to the item screenshot.
findOptionsImaging.FindOptionsA Imaging.FindOptions instance that defines the options for the comparison.
messagestringThe message to log. "{0}" is replaced by the name of the
itemInfoobject.optionsValidate.OptionsAdditional Validate.Options for this validation action.
Returns
- bool
Trueif the specifiedimagematches the screenshot of theitemInfo; otherwisefalse.
Exceptions
- ArgumentNullException
If
imageisnull.- ValidationException
If the validation fails and
options.ExceptionOnFail istrue.
CompareImage(RepoItemInfo, Bitmap, FindOptions, string, bool)
Validates if the screenshot of the specified repository item matches the given image.
public static bool CompareImage(RepoItemInfo itemInfo, Bitmap image, Imaging.FindOptions findOptions, string message, bool exceptionOnFail)
Parameters
itemInfoRepoItemInfoThe RepoItemInfo object for the repository item.
imageBitmapThe image which is compared to the item screenshot.
findOptionsImaging.FindOptionsA Imaging.FindOptions instance that defines the options for the comparison.
messagestringThe message to log. "{0}" is replaced by the name of the
itemInfoobject.exceptionOnFailboolA value specifying if an exception should be thrown if the validation fails.
Returns
- bool
Trueif the specifiedimagematches the screenshot of theitemInfo; otherwisefalse.
Exceptions
- ArgumentNullException
If
imageisnull.- ValidationException
If the validation fails and
exceptionOnFailistrue.
ContainsImage(Element, Bitmap, FindOptions)
Validates if the screenshot of the specified element contains the given image.
public static void ContainsImage(Element element, Bitmap image, Imaging.FindOptions findOptions)
Parameters
elementElementThe element to take the screenshot from.
imageBitmapThe image to search inside the element screenshot.
findOptionsImaging.FindOptionsA Imaging.FindOptions instance that defines the options for the search.
Exceptions
- ArgumentNullException
If
imageisnull.- ValidationException
If the validation fails.
ContainsImage(Element, Bitmap, FindOptions, string)
Validates if the screenshot of the specified element contains the given image.
public static void ContainsImage(Element element, Bitmap image, Imaging.FindOptions findOptions, string message)
Parameters
elementElementThe element to take the screenshot from.
imageBitmapThe image to search inside the element screenshot.
findOptionsImaging.FindOptionsA Imaging.FindOptions instance that defines the options for the search.
messagestringThe message to log. "{0}" is replaced by the string representation of the
element.
Exceptions
- ArgumentNullException
If
imageisnull.- ValidationException
If the validation fails.
ContainsImage(Element, Bitmap, FindOptions, string, Options)
Validates if the screenshot of the specified element contains the given image.
public static bool ContainsImage(Element element, Bitmap image, Imaging.FindOptions findOptions, string message, Validate.Options options)
Parameters
elementElementThe element to take the screenshot from.
imageBitmapThe image to search inside the element screenshot.
findOptionsImaging.FindOptionsA Imaging.FindOptions instance that defines the options for the search.
messagestringThe message to log. "{0}" is replaced by the string representation of the
element.optionsValidate.OptionsAdditional Validate.Options for this validation action.
Returns
- bool
Trueif the specifiedimageis contained in the screenshot of theelement; otherwisefalse.
Exceptions
- ArgumentNullException
If
imageisnull.- ValidationException
If the validation fails and
options.ExceptionOnFail istrue.
ContainsImage(Element, Bitmap, FindOptions, string, bool)
Validates if the screenshot of the specified element contains the given image.
public static bool ContainsImage(Element element, Bitmap image, Imaging.FindOptions findOptions, string message, bool exceptionOnFail)
Parameters
elementElementThe element to take the screenshot from.
imageBitmapThe image to search inside the element screenshot.
findOptionsImaging.FindOptionsA Imaging.FindOptions instance that defines the options for the search.
messagestringThe message to log. "{0}" is replaced by the string representation of the
element.exceptionOnFailboolA value specifying if an exception should be thrown if the validation fails.
Returns
- bool
Trueif the specifiedimageis contained in the screenshot of theelement; otherwisefalse.
Exceptions
- ArgumentNullException
If
imageisnull.- ValidationException
If the validation fails and
exceptionOnFailistrue.
ContainsImage(RepoItemInfo, Bitmap, FindOptions)
Validates if the screenshot of the specified repository item contains the given image.
public static void ContainsImage(RepoItemInfo itemInfo, Bitmap image, Imaging.FindOptions findOptions)
Parameters
itemInfoRepoItemInfoThe RepoItemInfo object for the repository item.
imageBitmapThe image to search inside the item screenshot.
findOptionsImaging.FindOptionsA Imaging.FindOptions instance that defines the options for the search.
Exceptions
- ArgumentNullException
If
imageisnull.- ValidationException
If the validation fails.
ContainsImage(RepoItemInfo, Bitmap, FindOptions, string)
Validates if the screenshot of the specified repository item contains the given image.
public static void ContainsImage(RepoItemInfo itemInfo, Bitmap image, Imaging.FindOptions findOptions, string message)
Parameters
itemInfoRepoItemInfoThe RepoItemInfo object for the repository item.
imageBitmapThe image to search inside the item screenshot.
findOptionsImaging.FindOptionsA Imaging.FindOptions instance that defines the options for the search.
messagestringThe message to log. "{0}" is replaced by the name of the
itemInfoobject.
Exceptions
- ArgumentNullException
If
imageisnull.- ValidationException
If the validation fails.
ContainsImage(RepoItemInfo, Bitmap, FindOptions, string, Options)
Validates if the screenshot of the specified repository item contains the given image.
public static bool ContainsImage(RepoItemInfo itemInfo, Bitmap image, Imaging.FindOptions findOptions, string message, Validate.Options options)
Parameters
itemInfoRepoItemInfoThe RepoItemInfo object for the repository item.
imageBitmapThe image to search inside the item screenshot.
findOptionsImaging.FindOptionsA Imaging.FindOptions instance that defines the options for the search.
messagestringThe message to log. "{0}" is replaced by the name of the
itemInfoobject.optionsValidate.OptionsAdditional Validate.Options for this validation action.
Returns
- bool
Trueif the specifiedimageis contained in the screenshot of theitemInfo; otherwisefalse.
Exceptions
- ArgumentNullException
If
imageisnull.- ValidationException
If the validation fails and
options.ExceptionOnFail istrue.
ContainsImage(RepoItemInfo, Bitmap, FindOptions, string, bool)
Validates if the screenshot of the specified repository item contains the given image.
public static bool ContainsImage(RepoItemInfo itemInfo, Bitmap image, Imaging.FindOptions findOptions, string message, bool exceptionOnFail)
Parameters
itemInfoRepoItemInfoThe RepoItemInfo object for the repository item.
imageBitmapThe image to search inside the item screenshot.
findOptionsImaging.FindOptionsA Imaging.FindOptions instance that defines the options for the search.
messagestringThe message to log. "{0}" is replaced by the name of the
itemInfoobject.exceptionOnFailboolA value specifying if an exception should be thrown if the validation fails.
Returns
- bool
Trueif the specifiedimageis contained in the screenshot of theitemInfo; otherwisefalse.
Exceptions
- ArgumentNullException
If
imageisnull.- ValidationException
If the validation fails and
exceptionOnFailistrue.
Exists(Element)
Validates if the specified element exists.
public static void Exists(Element element)
Parameters
elementElementThe element to validate.
Exceptions
- ValidationException
If the validation fails.
Exists(Element, string)
Validates if the specified element exists.
public static void Exists(Element element, string message)
Parameters
elementElementThe element to validate.
messagestringThe message to log. "{0}" is replaced by the string representation of the
element.
Exceptions
- ValidationException
If the validation fails.
Exists(Element, string, Options)
Validates if the specified element exists.
public static bool Exists(Element element, string message, Validate.Options options)
Parameters
elementElementThe element to validate.
messagestringThe message to log. "{0}" is replaced by the string representation of the
element.optionsValidate.OptionsAdditional Validate.Options for this validation action.
Returns
- bool
Trueif the element exists; otherwisefalse.
Exceptions
- ValidationException
If the validation fails and
options.ExceptionOnFail istrue.
Exists(Element, string, bool)
Validates if the specified element exists.
public static bool Exists(Element element, string message, bool exceptionOnFail)
Parameters
elementElementThe element to validate.
messagestringThe message to log. "{0}" is replaced by the string representation of the
element.exceptionOnFailboolA value specifying if an exception should be thrown if the validation fails.
Returns
- bool
Trueif the element exists; otherwisefalse.
Exceptions
- ValidationException
If the validation fails and
exceptionOnFailistrue.
Exists(RepoItemInfo)
Validates if the element for the specified repository item exists.
public static void Exists(RepoItemInfo itemInfo)
Parameters
itemInfoRepoItemInfoThe RepoItemInfo object for the repository item.
Exceptions
- ValidationException
If the validation fails.
Exists(RepoItemInfo, string)
Validates if the element for the specified repository item exists.
public static void Exists(RepoItemInfo itemInfo, string message)
Parameters
itemInfoRepoItemInfoThe RepoItemInfo object for the repository item.
messagestringThe message to log. "{0}" is replaced by the name of the
itemInfoobject.
Exceptions
- ValidationException
If the validation fails.
Exists(RepoItemInfo, string, Options)
Validates if the element for the specified repository item exists.
public static bool Exists(RepoItemInfo itemInfo, string message, Validate.Options options)
Parameters
itemInfoRepoItemInfoThe RepoItemInfo object for the repository item.
messagestringThe message to log. "{0}" is replaced by the name of the
itemInfoobject.optionsValidate.OptionsAdditional Validate.Options for this validation action.
Returns
- bool
Trueif the element for the repository item exists; otherwisefalse.
Exceptions
- ValidationException
If the validation fails and
options.ExceptionOnFail istrue.
Exists(RepoItemInfo, string, bool)
Validates if the element for the specified repository item exists.
public static bool Exists(RepoItemInfo itemInfo, string message, bool exceptionOnFail)
Parameters
itemInfoRepoItemInfoThe RepoItemInfo object for the repository item.
messagestringThe message to log. "{0}" is replaced by the name of the
itemInfoobject.exceptionOnFailboolA value specifying if an exception should be thrown if the validation fails.
Returns
- bool
Trueif the element for the repository item exists; otherwisefalse.
Exceptions
- ValidationException
If the validation fails and
exceptionOnFailistrue.
Exists(RxPath)
Validates if the element for the specified path exists using the DefaultSearchTimeout to keep looking for an element matching the path.
public static void Exists(RxPath path)
Parameters
pathRxPathThe path to validate.
Exceptions
- ValidationException
If the validation fails.
Exists(RxPath, Duration)
Validates if the element for the specified path exists.
public static void Exists(RxPath path, Duration searchTimeout)
Parameters
pathRxPathThe path to validate.
searchTimeoutDurationThe time to keep looking for an element matching the path.
Exceptions
- ValidationException
If the validation fails.
Exists(RxPath, Duration, string)
Validates if the element for the specified path exists.
public static void Exists(RxPath path, Duration searchTimeout, string message)
Parameters
pathRxPathThe path to validate.
searchTimeoutDurationThe time to keep looking for an element matching the path.
messagestringThe message to log. "{0}" is replaced by the string representation of the
path.
Exceptions
- ValidationException
If the validation fails.
Exists(RxPath, Duration, string, Options)
Validates if the element for the specified path exists.
public static bool Exists(RxPath path, Duration searchTimeout, string message, Validate.Options options)
Parameters
pathRxPathThe path to validate.
searchTimeoutDurationThe time to keep looking for an element matching the path.
messagestringThe message to log. "{0}" is replaced by the string representation of the
path.optionsValidate.OptionsAdditional Validate.Options for this validation action.
Returns
- bool
Trueif the element for the path exists; otherwisefalse.
Exceptions
- ValidationException
If the validation fails and
options.ExceptionOnFail istrue.
Exists(RxPath, Duration, string, bool)
Validates if the element for the specified path exists.
public static bool Exists(RxPath path, Duration searchTimeout, string message, bool exceptionOnFail)
Parameters
pathRxPathThe path to validate.
searchTimeoutDurationThe time to keep looking for an element matching the path.
messagestringThe message to log. "{0}" is replaced by the string representation of the
path.exceptionOnFailboolA value specifying if an exception should be thrown if the validation fails.
Returns
- bool
Trueif the element for the path exists; otherwisefalse.
Exceptions
- ValidationException
If the validation fails and
exceptionOnFailistrue.
Exists(string)
Validates if the element for the specified path exists using the DefaultSearchTimeout to keep looking for an element matching the path.
public static void Exists(string path)
Parameters
pathstringThe path to validate.
Exceptions
- ValidationException
If the validation fails.
Exists(string, Duration)
Validates if the element for the specified path exists.
public static void Exists(string path, Duration searchTimeout)
Parameters
pathstringThe path to validate.
searchTimeoutDurationThe time to keep looking for an element matching the path.
Exceptions
- ValidationException
If the validation fails.
Exists(string, Duration, string)
Validates if the element for the specified path exists.
public static void Exists(string path, Duration searchTimeout, string message)
Parameters
pathstringThe path to validate.
searchTimeoutDurationThe time to keep looking for an element matching the path.
messagestringThe message to log. "{0}" is replaced by the
path.
Exceptions
- ValidationException
If the validation fails.
Exists(string, Duration, string, Options)
Validates if the element for the specified path exists.
public static bool Exists(string path, Duration searchTimeout, string message, Validate.Options options)
Parameters
pathstringThe path to validate.
searchTimeoutDurationThe time to keep looking for an element matching the path.
messagestringThe message to log. "{0}" is replaced by the
path.optionsValidate.OptionsAdditional Validate.Options for this validation action.
Returns
- bool
Trueif the path is valid and the element for the path exists; otherwisefalse.
Exceptions
- ValidationException
If the validation fails and
options.ExceptionOnFail istrue.
Exists(string, Duration, string, bool)
Validates if the element for the specified path exists.
public static bool Exists(string path, Duration searchTimeout, string message, bool exceptionOnFail)
Parameters
pathstringThe path to validate.
searchTimeoutDurationThe time to keep looking for an element matching the path.
messagestringThe message to log. "{0}" is replaced by the
path.exceptionOnFailboolA value specifying if an exception should be thrown if the validation fails.
Returns
- bool
Trueif the path is valid and the element for the path exists; otherwisefalse.
Exceptions
- ValidationException
If the validation fails and
exceptionOnFailistrue.
Fail()
Always lets the validation fail.
public static void Fail()
Remarks
Use this method to mark a 'test case' or 'smart folder' as failed and immediately exit the current module and test iteration.
Exceptions
- ValidationException
Always thrown.
Fail(string)
Always lets the validation fail.
public static void Fail(string message)
Parameters
messagestringThe message to log.
Remarks
Use this method to mark a 'test case' or 'smart folder' as failed and immediately exit the current module and test iteration.
Exceptions
- ValidationException
Always thrown.
Fail(string, Options)
Always lets the validation fail.
public static bool Fail(string message, Validate.Options options)
Parameters
messagestringThe message to log.
optionsValidate.OptionsAdditional Validate.Options for this validation action.
Returns
- bool
Always returns
false(unless a ValidationException is thrown depending on the passedoptions).
Exceptions
- ValidationException
If
options.ExceptionOnFail istrue.
IsFalse(bool)
Validates if the given condition is false.
public static void IsFalse(bool condition)
Parameters
conditionboolThe condition to validate.
Exceptions
- ValidationException
If the validation fails.
IsFalse(bool, string)
Validates if the given condition is false.
public static void IsFalse(bool condition, string message)
Parameters
Exceptions
- ValidationException
If the validation fails.
IsFalse(bool, string, Options)
Validates if the given condition is false.
public static bool IsFalse(bool condition, string message, Validate.Options options)
Parameters
conditionboolThe condition to validate.
messagestringThe message to log.
optionsValidate.OptionsAdditional Validate.Options for this validation action.
Returns
- bool
trueif the specified condition is false; otherwise,false.
Exceptions
- ValidationException
If the validation fails and
options.ExceptionOnFail istrue.
IsFalse(bool, string, bool)
Validates if the given condition is false.
public static bool IsFalse(bool condition, string message, bool exceptionOnFail)
Parameters
conditionboolThe condition to validate.
messagestringThe message to log.
exceptionOnFailboolA value specifying if an exception should be thrown if the validation fails.
Returns
- bool
trueif the specified condition is false; otherwise,false.
Exceptions
- ValidationException
If the validation fails and
exceptionOnFailistrue.
IsTrue(bool)
Validates if the given condition is true.
public static void IsTrue(bool condition)
Parameters
conditionboolThe condition to validate.
Exceptions
- ValidationException
If the validation fails.
IsTrue(bool, string)
Validates if the given condition is true.
public static void IsTrue(bool condition, string message)
Parameters
Exceptions
- ValidationException
If the validation fails.
IsTrue(bool, string, Options)
Validates if the given condition is true.
public static bool IsTrue(bool condition, string message, Validate.Options options)
Parameters
conditionboolThe condition to validate.
messagestringThe message to log.
optionsValidate.OptionsAdditional Validate.Options for this validation action.
Returns
- bool
trueif the specified condition is true; otherwise,false.
Exceptions
- ValidationException
If the validation fails and
options.ExceptionOnFail istrue.
IsTrue(bool, string, bool)
Validates if the given condition is true.
public static bool IsTrue(bool condition, string message, bool exceptionOnFail)
Parameters
conditionboolThe condition to validate.
messagestringThe message to log.
exceptionOnFailboolA value specifying if an exception should be thrown if the validation fails.
Returns
- bool
trueif the specified condition is true; otherwise,false.
Exceptions
- ValidationException
If the validation fails and
exceptionOnFailistrue.
NotExists(Element)
Validates if the specified element does not exist.
public static void NotExists(Element element)
Parameters
elementElementThe element to validate.
Exceptions
- ValidationException
If the validation fails.
NotExists(Element, string)
Validates if the specified element does not exist.
public static void NotExists(Element element, string message)
Parameters
elementElementThe element to validate.
messagestringThe message to log. "{0}" is replaced by the string representation of the
element.
Exceptions
- ValidationException
If the validation fails.
NotExists(Element, string, Options)
Validates if the specified element does not exist.
public static bool NotExists(Element element, string message, Validate.Options options)
Parameters
elementElementThe element to validate.
messagestringThe message to log. "{0}" is replaced by the string representation of the
element.optionsValidate.OptionsAdditional Validate.Options for this validation action.
Returns
- bool
Trueif the element does not exist; otherwisefalse.
Exceptions
- ValidationException
If the validation fails and
options.ExceptionOnFail istrue.
NotExists(Element, string, bool)
Validates if the specified element does not exist.
public static bool NotExists(Element element, string message, bool exceptionOnFail)
Parameters
elementElementThe element to validate.
messagestringThe message to log. "{0}" is replaced by the string representation of the
element.exceptionOnFailboolA value specifying if an exception should be thrown if the validation fails.
Returns
- bool
Trueif the element does not exist; otherwisefalse.
Exceptions
- ValidationException
If the validation fails and
exceptionOnFailistrue.
NotExists(RepoItemInfo)
Validates if the element for the specified repository item does not exist.
public static void NotExists(RepoItemInfo itemInfo)
Parameters
itemInfoRepoItemInfoThe RepoItemInfo object for the repository item.
Exceptions
- ValidationException
If the validation fails.
NotExists(RepoItemInfo, string)
Validates if the element for the specified repository item does not exist.
public static void NotExists(RepoItemInfo itemInfo, string message)
Parameters
itemInfoRepoItemInfoThe RepoItemInfo object for the repository item.
messagestringThe message to log. "{0}" is replaced by the name of the
itemInfoobject.
Exceptions
- ValidationException
If the validation fails.
NotExists(RepoItemInfo, string, Options)
Validates if the element for the specified repository item does not exist.
public static bool NotExists(RepoItemInfo itemInfo, string message, Validate.Options options)
Parameters
itemInfoRepoItemInfoThe RepoItemInfo object for the repository item.
messagestringThe message to log. "{0}" is replaced by the name of the
itemInfoobject.optionsValidate.OptionsAdditional Validate.Options for this validation action.
Returns
- bool
Trueif the element for the repository item does not exist; otherwisefalse.
Exceptions
- ValidationException
If the validation fails and
options.ExceptionOnFail istrue.
NotExists(RepoItemInfo, string, bool)
Validates if the element for the specified repository item does not exist.
public static bool NotExists(RepoItemInfo itemInfo, string message, bool exceptionOnFail)
Parameters
itemInfoRepoItemInfoThe RepoItemInfo object for the repository item.
messagestringThe message to log. "{0}" is replaced by the name of the
itemInfoobject.exceptionOnFailboolA value specifying if an exception should be thrown if the validation fails.
Returns
- bool
Trueif the element for the repository item does not exist; otherwisefalse.
Exceptions
- ValidationException
If the validation fails and
exceptionOnFailistrue.
NotExists(RxPath)
Validates if the element for the specified path does not exist using the DefaultSearchTimeout to keep looking for an element matching the path.
public static void NotExists(RxPath path)
Parameters
pathRxPathThe path to validate.
Exceptions
- ValidationException
If the validation fails.
NotExists(RxPath, Duration)
Validates if the element for the specified path does not exist.
public static void NotExists(RxPath path, Duration searchTimeout)
Parameters
pathRxPathThe path to validate.
searchTimeoutDurationThe time to keep looking for an element matching the path.
Exceptions
- ValidationException
If the validation fails.
NotExists(RxPath, Duration, string)
Validates if the element for the specified path does not exist.
public static void NotExists(RxPath path, Duration searchTimeout, string message)
Parameters
pathRxPathThe path to validate.
searchTimeoutDurationThe time to keep looking for an element matching the path.
messagestringThe message to log. "{0}" is replaced by the string representation of the
path.
Exceptions
- ValidationException
If the validation fails.
NotExists(RxPath, Duration, string, Options)
Validates if the element for the specified path does not exist.
public static bool NotExists(RxPath path, Duration searchTimeout, string message, Validate.Options options)
Parameters
pathRxPathThe path to validate.
searchTimeoutDurationThe time to keep looking for an element matching the path.
messagestringThe message to log. "{0}" is replaced by the string representation of the
path.optionsValidate.OptionsAdditional Validate.Options for this validation action.
Returns
- bool
Trueif the element for the path does not exist; otherwisefalse.
Exceptions
- ValidationException
If the validation fails and
options.ExceptionOnFail istrue.
NotExists(RxPath, Duration, string, bool)
Validates if the element for the specified path does not exist.
public static bool NotExists(RxPath path, Duration searchTimeout, string message, bool exceptionOnFail)
Parameters
pathRxPathThe path to validate.
searchTimeoutDurationThe time to keep looking for an element matching the path.
messagestringThe message to log. "{0}" is replaced by the string representation of the
path.exceptionOnFailboolA value specifying if an exception should be thrown if the validation fails.
Returns
- bool
Trueif the element for the path does not exist; otherwisefalse.
Exceptions
- ValidationException
If the validation fails and
exceptionOnFailistrue.
NotExists(string)
Validates if the element for the specified path does not exist using the DefaultSearchTimeout to keep looking for an element matching the path.
public static void NotExists(string path)
Parameters
pathstringThe path to validate.
Exceptions
- ValidationException
If the validation fails.
NotExists(string, Duration)
Validates if the element for the specified path does not exist.
public static void NotExists(string path, Duration searchTimeout)
Parameters
pathstringThe path to validate.
searchTimeoutDurationThe time to keep looking for an element matching the path.
Exceptions
- ValidationException
If the validation fails.
NotExists(string, Duration, string)
Validates if the element for the specified path does not exist.
public static void NotExists(string path, Duration searchTimeout, string message)
Parameters
pathstringThe path to validate.
searchTimeoutDurationThe time to keep looking for an element matching the path.
messagestringThe message to log. "{0}" is replaced by the
path.
Exceptions
- ValidationException
If the validation fails.
NotExists(string, Duration, string, Options)
Validates if the element for the specified path does not exist.
public static bool NotExists(string path, Duration searchTimeout, string message, Validate.Options options)
Parameters
pathstringThe path to validate.
searchTimeoutDurationThe time to keep looking for an element matching the path.
messagestringThe message to log. "{0}" is replaced by the
path.optionsValidate.OptionsAdditional Validate.Options for this validation action.
Returns
- bool
Trueif the path is not valid or the element for the path does not exist; otherwisefalse.
Exceptions
- ValidationException
If the validation fails and
options.ExceptionOnFail istrue.
NotExists(string, Duration, string, bool)
Validates if the element for the specified path does not exist.
public static bool NotExists(string path, Duration searchTimeout, string message, bool exceptionOnFail)
Parameters
pathstringThe path to validate.
searchTimeoutDurationThe time to keep looking for an element matching the path.
messagestringThe message to log. "{0}" is replaced by the
path.exceptionOnFailboolA value specifying if an exception should be thrown if the validation fails.
Returns
- bool
Trueif the path is not valid or the element for the path does not exist; otherwisefalse.
Exceptions
- ValidationException
If the validation fails and
exceptionOnFailistrue.