public ICallSpecification FromPendingSpecification(MatchArgs matchArgs)
        {
            if (!_pendingSpecification.HasPendingCallSpecInfo())
            {
                throw new InvalidOperationException("No pending specification or previous call info.");
            }

            var pendingSpecInfo = _pendingSpecification.UseCallSpecInfo();

            return(pendingSpecInfo.Handle(
                       callSpec => FromExistingSpec(callSpec, matchArgs),
                       lastCall =>
            {
                _callCollection.Delete(lastCall);
                return FromCall(lastCall, matchArgs);
            }));
        }
Exemple #2
0
 public bool HasPendingCallSpecInfo() => _impl.HasPendingCallSpecInfo();