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); })); }
public bool HasPendingCallSpecInfo() => _impl.HasPendingCallSpecInfo();