コード例 #1
0
            public void Resulting_spec_should_be_satisfied_if_call_method_and_arg_specs_are_satisfied()
            {
                var specifiedMethod = _call.GetMethodInfo();
                var args            = CreateArgsThatMatchArgSpecsFromFactory();

                var callThatShouldMatch = CreateStubCall(specifiedMethod, args);

                Assert.That(_result.IsSatisfiedBy(callThatShouldMatch));
            }
コード例 #2
0
ファイル: CallActions.cs プロジェクト: zvirja/NSubstitute
 public bool IsSatisfiedBy(ICall call) => _callSpecification.IsSatisfiedBy(call);
コード例 #3
0
 public bool IsResultFor(ICall call)
 {
     return(_callSpecification.IsSatisfiedBy(call));
 }
コード例 #4
0
ファイル: CallStack.cs プロジェクト: rodrigoelp/NSubstitute
 public IEnumerable<ICall> FindMatchingCalls(ICallSpecification callSpecification)
 {
     return _stack.Where(x => callSpecification.IsSatisfiedBy(x));
 }
コード例 #5
0
ファイル: CallStack.cs プロジェクト: troyhunt/NSubstitute
 public void ThrowIfCallNotFound(ICallSpecification callSpecification)
 {
     if (_stack.Any(receivedCall => callSpecification.IsSatisfiedBy(receivedCall))) return;
     throw new CallNotReceivedException();
 }