Пример #1
0
 /// <summary>
 /// Compares the values using the specified property.
 /// </summary>
 /// <param name="property">The property.</param>
 /// <param name="expectedValue">The expected value.</param>
 /// <param name="actualValue">The actual value.</param>
 /// <returns><c>true</c> if the comparison passes, <c>false</c> otherwise.</returns>
 public override bool Compare(IPropertyData property, string expectedValue, string actualValue)
 {
     bool parsedValue;
     return (expectedValue != null && bool.TryParse(expectedValue, out parsedValue) && !parsedValue)
                ? !property.CheckElementEnabled()
                : property.CheckElementEnabled();
 }
Пример #2
0
        /// <summary>
        /// Compares the values using the specified property.
        /// </summary>
        /// <param name="property">The property.</param>
        /// <param name="expectedValue">The expected value.</param>
        /// <param name="actualValue">The actual value.</param>
        /// <returns><c>true</c> if the comparison passes, <c>false</c> otherwise.</returns>
        public override bool Compare(IPropertyData property, string expectedValue, string actualValue)
        {
            bool parsedValue;

            return((expectedValue != null && bool.TryParse(expectedValue, out parsedValue) && !parsedValue)
                       ? !property.CheckElementEnabled()
                       : property.CheckElementEnabled());
        }
 /// <summary>
 /// Checks the element.
 /// </summary>
 /// <param name="propertyData">The property data.</param>
 /// <returns><c>true</c> if the element exists, <c>false</c> otherwise.</returns>
 protected override bool CheckElement(IPropertyData propertyData)
 {
     return propertyData.CheckElementEnabled();
 }
 /// <summary>
 /// Checks the element.
 /// </summary>
 /// <param name="propertyData">The property data.</param>
 /// <returns><c>true</c> if the element is enabled, <c>false</c> otherwise.</returns>
 protected override bool CheckElement(IPropertyData propertyData)
 {
     return(propertyData.CheckElementEnabled());
 }
Пример #5
0
 /// <summary>
 /// Compares the values using the specified property.
 /// </summary>
 /// <param name="property">The property.</param>
 /// <param name="expectedValue">The expected value.</param>
 /// <param name="actualValue">The actual value.</param>
 /// <returns><c>true</c> if the comparison passes, <c>false</c> otherwise.</returns>
 public override bool Compare(IPropertyData property, string expectedValue, string actualValue)
 {
     // Note: expected value is ignored when checking this
     return(property.CheckElementEnabled());
 }