/// <summary> /// Use to compose expectations into one matcher /// </summary> /// <param name="continuation">Continuation to operate on</param> /// <param name="expectationsRunner">Runs your composed expectations</param> /// <param name="callingMethod"></param> /// <typeparam name="T"></typeparam> public static IMore <T> Compose <T>( this ICanAddMatcher <T> continuation, Action <T> expectationsRunner, [CallerMemberName] string callingMethod = null ) { return(continuation.Compose(expectationsRunner, (a, b) => $"Expectation \"{callingMethod}\" should {(!b).AsNot()}have failed.")); }
/// <summary> /// Use to compose expectations into one matcher /// </summary> /// <param name="continuation">Continuation to operate on</param> /// <param name="expectationsRunner">Runs your composed expectations</param> /// <param name="callingMethod"></param> /// <typeparam name="T"></typeparam> public static IMore <IEnumerable <T> > Compose <T>( this ICanAddMatcher <IEnumerable <T> > continuation, Action <IEnumerable <T> > expectationsRunner, [CallerMemberName] string callingMethod = null ) { return(continuation.Compose(expectationsRunner, (a, b) => $"{callingMethod} should {b.AsNot()}have passed.")); }