示例#1
0
 /// <summary>
 /// Tests whether the Actual string is matched by the given Regex
 /// </summary>
 /// <param name="matcher">Continuation to operate on</param>
 /// <param name="regex">Regex string to match with</param>
 /// <returns>More continuation for Actual string</returns>
 public static IStringMore Match(
     this IToAfterNot <string> matcher,
     string regex
     )
 {
     return(matcher.Match(regex, NULL_STRING));
 }
 /// <summary>
 /// Match the value under test with a simple Func which takes in your value
 /// and returns true if the test should pass.
 /// </summary>
 /// <param name="continuation">Continuation to act on</param>
 /// <param name="test">Func to test the original value with</param>
 /// <typeparam name="T"></typeparam>
 public static void Match <T>(
     this IToAfterNot <T> continuation,
     Func <T, bool> test
     )
 {
     continuation.Match(test, NULL_STRING);
 }
示例#3
0
 /// <summary>
 /// Tests whether the Actual string is matched by the given Regex
 /// </summary>
 /// <param name="matcher">Continuation to operate on</param>
 /// <param name="regex">Regex string to match with</param>
 /// <param name="customMessage">Custom message to add to failure messages</param>
 /// <returns>More continuation for Actual string</returns>
 public static IStringMore Match(
     this IToAfterNot <string> matcher,
     string regex,
     string customMessage
     )
 {
     return(matcher.Match(regex, () => customMessage));
 }
 /// <summary>
 /// Match the value under test with a simple Func which takes in your value
 /// and returns true if the test should pass.
 /// </summary>
 /// <param name="continuation">Continuation to act on</param>
 /// <param name="test">Func to test the original value with</param>
 /// <param name="customMessage">Message to include in the result upon failure</param>
 /// <typeparam name="T"></typeparam>
 public static void Match <T>(
     this IToAfterNot <T> continuation,
     Func <T, bool> test,
     string customMessage
     )
 {
     continuation.Match(test, () => customMessage);
 }