public CountMatchContinuationOfStringCollectionVerb(
     ICountMatchContinuation <IEnumerable <string> > wrapped,
     CountMatchMethods method,
     int expectedCount
     ) : base(wrapped, method, expectedCount)
 {
 }
 public CountMatchDeepEqual(
     ICanAddMatcher <T> continuation,
     CountMatchMethods method,
     int compare)
 {
     Continuation  = continuation;
     Method        = method;
     ExpectedCount = compare;
 }
Example #3
0
 public CountMatchMatched(
     ICanAddMatcher <T> continuation,
     CountMatchMethods method,
     int compare)
 {
     Continuation = continuation;
     Method       = method;
     Compare      = compare;
 }
 public CountMatchContinuation(
     ICanAddMatcher <T> wrapped,
     CountMatchMethods method,
     int expectedCount
     )
 {
     _wrapped       = wrapped;
     _method        = method;
     _expectedCount = expectedCount;
     SetParent(wrapped as IExpectationContext <T>);
 }
Example #5
0
        private static MatcherResult TestCollection(
            IEnumerable <int> collection,
            int expectedCount,
            CountMatchMethods method,
            Func <int, bool> itemTester,
            Func <bool, string> messageGenerator)
        {
            var count  = collection.Count(itemTester);
            var total  = collection.Count();
            var passed = _strategies[method](total, count, expectedCount);

            return(new MatcherResult(
                       passed,
                       () => messageGenerator(passed)
                       ));
        }