/// <summary> /// Continue testing a string for another substring /// </summary> /// <param name="continuation">Existing continuation fron a Contain()</param> /// <param name="search">string to search for</param> /// <returns>IStringContainContinuation onto which you can chain .And</returns> public static IStringMore And( this IStringContainContinuation continuation, string search ) { return(continuation.And(search, NULL_STRING)); }
/// <summary> /// Continue testing a string for another substring /// </summary> /// <param name="continuation">Existing continuation fron a Contain()</param> /// <param name="search">string to search for</param> /// <param name="customMessage">Custom message to include in failure messages</param> /// <returns>IStringContainContinuation onto which you can chain .And</returns> public static IStringMore And( this IStringContainContinuation continuation, string search, string customMessage ) { return(continuation.And(search, () => customMessage)); }
public static IStringContainContinuation And( this IStringContainContinuation continuation, string search ) { AddContainsMatcherTo(continuation, search); return(new StringContainContinuation(continuation)); }
/// <summary> /// Continue testing a string for another substring from beyond the end of the last match /// </summary> /// <param name="continuation">Continuation to operate on</param> /// <param name="search">String to search for</param> /// <param name="customMessageGenerator">Generates a custom message to include in failure messages</param> /// <returns></returns> public static IStringMore Then( this IStringContainContinuation continuation, string search, Func <string> customMessageGenerator ) { var result = new StringContainContinuation(continuation); AddContainsMatcherTo(continuation, search, customMessageGenerator, result); return(result); }
/// <summary> /// Continue testing a string for another substring /// </summary> /// <param name="continuation">Existing continuation fron a Contain()</param> /// <param name="search">string to search for</param> /// <param name="customMessageGenerator">Generates a custom message to include in failure messages</param> /// <returns>IStringContainContinuation onto which you can chain .And</returns> public static IStringMore And( this IStringContainContinuation continuation, string search, Func <string> customMessageGenerator ) { var result = new StringContainContinuation(continuation); continuation.SetMetadata(SEARCH_OFFSET, 0); // And will reset the offset -- it's not ordered AddContainsMatcherTo(continuation, search, customMessageGenerator, result); return(result); }