Ejemplo n.º 1
0
 /// <summary>
 /// Tests whether the Actual string is matched by the given Regex
 /// </summary>
 /// <param name="matched">Continuation to operate on</param>
 /// <param name="regex">Regular expression which will be compiled into a Regex instance to match with</param>
 /// <returns>More continuation for Actual string</returns>
 public static IStringMore By(
     this IStringMatched matched,
     string regex
     )
 {
     return(matched.By(regex, null));
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Tests whether the Actual string is matched by the given Regex
 /// </summary>
 /// <param name="matched">Continuation to operate on</param>
 /// <param name="regex">Regex instance to match with</param>
 /// <returns>More continuation for Actual string</returns>
 public static IStringMore By(
     this IStringMatched matched,
     Regex regex
     )
 {
     return(matched.By(regex, NULL_STRING));
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Tests whether the Actual string is matched by the given Regex
 /// </summary>
 /// <param name="matched">Continuation to operate on</param>
 /// <param name="regex">Regular expression which will be compiled into a Regex instance 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 By(
     this IStringMatched matched,
     string regex,
     string customMessage
     )
 {
     return(matched.By(CompileRegexFor(regex), customMessage));
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Tests whether the Actual string is matched by the given Regex
 /// </summary>
 /// <param name="matched">Continuation to operate on</param>
 /// <param name="regex">Regex instance 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 By(
     this IStringMatched matched,
     Regex regex,
     string customMessage
     )
 {
     return(matched.By(regex, () => customMessage));
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Tests whether the Actual string is matched by the given Regex
 /// </summary>
 /// <param name="matched">Continuation to operate on</param>
 /// <param name="regex">Regex instance to match with</param>
 /// <param name="customMessageGenerator">Custom message to add to failure messages</param>
 /// <returns>More continuation for Actual string</returns>
 public static IStringMore By(
     this IStringMatched matched,
     Regex regex,
     Func <string> customMessageGenerator
     )
 {
     AddRegexMatcher(matched, regex, customMessageGenerator);
     return(matched.More());
 }