Ejemplo n.º 1
0
 /// <summary>
 /// VerifyValue Method Tests that two input parameters have equal values. If the two input objects have equal values, the test is considered a success.
 /// If the two input objects differ, the test is considered to fail
 /// </summary>
 /// <param name="actualValue">The actual value returned by the test subject</param>
 /// <param name="expectedValue">The value that the test subject is supposed to return</param>
 /// <param name="message">Message to associate with the Verify if the test fails</param>
 /// <param name="comparison">The type of comparison that should be tested</param>
 public void VerifyValue(IComparable actualValue, IComparable expectedValue, string message, VerifiableLog.ComparisonType comparison)
 {
     if (comparison == ComparisonType.Equal)
     {
         VerifyValue(actualValue, expectedValue, message);
     }
     else
     {
         VerifyNotValue(actualValue, expectedValue, message);
     }
 }
Ejemplo n.º 2
0
        /// <summary>
        /// VerifyValue Method Tests that two input parameters have equal values. If the two input objects have equal values, the test is considered a success.
        /// If the two input objects differ, the test is considered to fail
        /// </summary>
        /// <param name="actualValue">The actual value returned by the test subject</param>
        /// <param name="expectedValue">The value that the test subject is supposed to return</param>
        /// <param name="message">Message to associate with the Verify if the test fails</param>
        /// <param name="ignoreCase">If true, causes a case insensitive string comparison to occur</param>
        /// <param name="comparison">The type of comparison that should be tested</param>
        public void VerifyValue(string actualValue, string expectedValue, string message, bool ignoreCase, VerifiableLog.ComparisonType comparison)
        {
            var messageModified = String.Format("{0} [Actual: {1}, Expected: {2}]", message, actualValue, expectedValue);

            if (comparison == ComparisonType.Equal)
            {
                VerifyTrue(string.Equals(actualValue, expectedValue, ignoreCase ? StringComparison.CurrentCultureIgnoreCase : StringComparison.CurrentCulture), messageModified);
            }
            else
            {
                VerifyFalse(string.Equals(actualValue, expectedValue, ignoreCase ? StringComparison.CurrentCultureIgnoreCase : StringComparison.CurrentCulture), messageModified);
            }
        }
Ejemplo n.º 3
0
 /// <summary>
 /// VerifySubString Method Tests whether the input parameter contains a specific substring. If the actual value contains the substring,
 /// the test is considered a success. If the actual value does not contain the substring, the test is considered to fail.
 /// </summary>
 /// <param name="actualFullString">The actual value returned by the test subject</param>
 /// <param name="expectedSubString">The substring that the test subject is supposed to contain</param>
 /// <param name="ignoreCase">If true, causes a case insensitive string comparison to occur</param>
 /// <param name="comparison">The type of comparison that should be tested.</param>
 public void VerifySubString(string actualFullString, string expectedSubString, bool ignoreCase, VerifiableLog.ComparisonType comparison)
 {
     throw new NotImplementedException("This method is not implemented yet!");
 }