예제 #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());
 }