Exemplo n.º 1
0
        public void ExpectMethodCall(string name, int expectedCalls = 1, object returnValue = null, params object[] arguments)
        {
            Contract.Requires(!string.IsNullOrEmpty(name));
            Contract.Requires(expectedCalls > 0);

            var method = new MethodCallInstance(name, arguments) {
                ExpectedCallTimes = expectedCalls,
                DeliveredReturnValue = returnValue,
                DoesReturn = MethodType.ValueReturn
            };

            _calls.Add(method);
        }
Exemplo n.º 2
0
        public void ExpectMethodCall(string name, int expectedCalls = 1, object returnValue = null, params object[] arguments)
        {
            Contract.Requires(!string.IsNullOrEmpty(name));
            Contract.Requires(expectedCalls > 0);

            var method = new MethodCallInstance(name, arguments)
            {
                ExpectedCallTimes    = expectedCalls,
                DeliveredReturnValue = returnValue,
                DoesReturn           = MethodType.ValueReturn
            };

            _calls.Add(method);
        }