Exemple #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());
        }
Exemple #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;
        }
Exemple #3
0
        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();
            }
        }
Exemple #4
0
 public bool IsPartOfFluentSetup(out IFluentSetup fluentSetup)
 {
     return((fluentSetup = this.fluentSetup) != null);
 }
Exemple #5
0
 public SequenceSetup(FluentSetup fluentSetup, Mock mock, InvocationShape expectation)
     : base(fluentSetup, mock, expectation)
 {
     this.responses = new ConcurrentQueue <Response>();
 }