Exemple #1
0
 public ICallSpecification FromPendingSpecification(MatchArgs matchArgs, PendingSpecificationInfo pendingSpecInfo)
 {
     return(pendingSpecInfo.Handle(
                callSpec => FromExistingSpec(callSpec, matchArgs),
                lastCall =>
     {
         _receivedCalls.Delete(lastCall);
         return FromCall(lastCall, matchArgs);
     }));
 }
Exemple #2
0
        public ICallSpecification FromPendingSpecification(MatchArgs matchArgs, PendingSpecificationInfo pendingSpecInfo)
        {
            if (pendingSpecInfo == null)
            {
                throw new ArgumentNullException(nameof(pendingSpecInfo));
            }

            return(pendingSpecInfo.Handle(
                       callSpec => FromExistingSpec(callSpec, matchArgs),
                       lastCall =>
            {
                _receivedCalls.Delete(lastCall);
                return FromCall(lastCall, matchArgs);
            }));
        }