/// <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.CheckElementNotExists() : property.CheckElementNotExists(); }
/// <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.CheckElementNotExists() : property.CheckElementNotExists()); }
/// <inheritdoc /> /// <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) { return(property.CheckElementNotExists()); }