コード例 #1
0
        protected SetupWithOutParameterSupport(FluentSetup fluentSetup, Mock mock, InvocationShape expectation)
            : base(fluentSetup, mock, expectation)
        {
            Debug.Assert(expectation != null);

            this.outValues = GetOutValues(expectation.Arguments, expectation.Method.GetParameters());
        }
コード例 #2
0
        protected Setup(FluentSetup fluentSetup, Mock mock, InvocationShape expectation)
        {
            Debug.Assert(mock != null);
            Debug.Assert(expectation != null);

            this.fluentSetup = fluentSetup;
            this.expectation = expectation;
            this.mock        = mock;
        }
コード例 #3
0
ファイル: MethodCall.cs プロジェクト: Kanison-Feng/moq4
        public MethodCall(FluentSetup fluentSetup, Mock mock, Condition condition, InvocationShape expectation)
            : base(fluentSetup, mock, expectation)
        {
            this.condition = condition;
            this.flags     = expectation.Method.ReturnType != typeof(void) ? Flags.MethodIsNonVoid : 0;

            if ((mock.Switches & Switches.CollectDiagnosticFileInfoForSetups) != 0)
            {
                this.declarationSite = GetUserCodeCallSite();
            }
        }
コード例 #4
0
 public bool IsPartOfFluentSetup(out IFluentSetup fluentSetup)
 {
     return((fluentSetup = this.fluentSetup) != null);
 }
コード例 #5
0
 public SequenceSetup(FluentSetup fluentSetup, Mock mock, InvocationShape expectation)
     : base(fluentSetup, mock, expectation)
 {
     this.responses = new ConcurrentQueue <Response>();
 }