示例#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.CheckElementNotExists()
                : property.CheckElementNotExists();
 }
示例#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.CheckElementNotExists()
                       : property.CheckElementNotExists());
        }
示例#3
0
 /// <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());
 }