public MethodReturnsSetup(IWcfProxy wcfProxy, ServiceStub service, IInvocationMatcher invocationMatcher, MethodInfo serviceMethod)
 {
     _wcfProxy          = wcfProxy;
     _service           = service;
     _invocationMatcher = invocationMatcher;
     _serviceMethod     = serviceMethod;
 }
Example #2
0
        public SendAfterEndpointEventConfiguration Setup(Expression <Action <T> > methodSignatureExpectation)
        {
            IInvocationMatcher invocationMatcher = _parser.Parse(methodSignatureExpectation);

            var sequence = new TriggeredMessageSequence();
            var trigger  = new InvocationTriggeringSequenceOfEvents(invocationMatcher, sequence);

            _serviceImplementation.AddInvocation(trigger, new ProduceNullReturnValue());

            return(new SendAfterEndpointEventConfiguration(sequence, _service));
        }
Example #3
0
        public Expectation(IInvocationMatcher invocationMatcher, NumberOfInvocationsConstraint numberOfInvocationsConstraint)
        {
            if (invocationMatcher == null)
            {
                throw new ArgumentNullException("invocationMatcher");
            }

            if (numberOfInvocationsConstraint == null)
            {
                throw new ArgumentNullException("numberOfInvocationsConstraint");
            }

            this.invocationMatcher             = invocationMatcher;
            this.numberOfInvocationsConstraint = numberOfInvocationsConstraint;
            this.actions = new List <IAction>();
        }
 public InvocationTriggeringSequenceOfEvents(IInvocationMatcher matcher, TriggeredMessageSequence sequence)
 {
     _matcher = matcher;
     _sequence = sequence;
 }
Example #5
0
        public MethodReturnsSetup <R> Setup <R>(Expression <Func <T, R> > methodSignatureExpectation)
        {
            IInvocationMatcher invocationMatcher = _parser.Parse(methodSignatureExpectation);

            return(new MethodReturnsSetup <R>(this, _service, invocationMatcher, _parser.GetInvokedMethod(methodSignatureExpectation)));
        }
Example #6
0
        public MethodVoidSetup When(Expression <Action <T> > methodSignatureExpectation)
        {
            IInvocationMatcher invocationMatcher = _parser.Parse(methodSignatureExpectation);

            return(new MethodVoidSetup(this, _service, invocationMatcher, _parser.GetInvokedMethod(methodSignatureExpectation)));
        }
 public RouteInvocationTriggeringSequenceOfEvents(IRouteTemplate routeOwningUrl, IInvocationMatcher matcher, TriggeredMessageSequence sequence)
 {
     _routeOwningUrl = routeOwningUrl;
     _matcher        = matcher;
     _sequence       = sequence;
 }
Example #8
0
 public void AddInvocation(IInvocationMatcher matcher, IInvocationReturnValueProducer returnValueProducer)
 {
     _invocationVersusReturnValue.Add(matcher, returnValueProducer);
 }
 public void AddInvocation(IInvocationMatcher matcher, IInvocationReturnValueProducer returnValueProducer)
 {
     _invocationVersusReturnValue.Add(matcher, returnValueProducer);
 }
 public void AddInvocation(IInvocationMatcher matcher, IInvocationVoidCaller voidCaller)
 {
     _invocationVersusVoid.Add(matcher, voidCaller);
 }
Example #11
0
 public ReturnFromGetInvocationConfiguration(IInvocationMatcher matcher, IRouteTemplate <R> route, ServiceStub service)
 {
     _matcher = matcher;
     _route   = route;
     _service = service;
 }
Example #12
0
 public void AddReturn(IInvocationMatcher invocation, IInvocationReturnValueProducer returnValue)
 {
     _invocationVsReturnValue.Add(invocation, returnValue);
 }
Example #13
0
        public ReturnFromGetInvocationConfiguration <R> With(IGetInvocationConfiguration configuration)
        {
            IInvocationMatcher matcher = configuration.CreateInvocationInspector(_routeToConfigure);

            return(new ReturnFromGetInvocationConfiguration <R>(matcher, _routeToConfigure, _service));
        }
 public LogicalOrOfInvocations(IInvocationMatcher left, IInvocationMatcher right)
 {
     _left = left;
     _right = right;
 }
Example #15
0
 static void AddExpectation(IExpectationScope expectationScope, IInvocationMatcher invocationMatcher, NumberOfInvocationsConstraint numberOfInvocationsConstraint)
 {
     expectationScope.Add(new Expectation(invocationMatcher, numberOfInvocationsConstraint), false);
 }
Example #16
0
 public LogicalOrOfInvocations(IInvocationMatcher left, IInvocationMatcher right)
 {
     _left  = left;
     _right = right;
 }
 public RouteInvocationTriggeringSequenceOfEvents(IRouteTemplate routeOwningUrl, IInvocationMatcher matcher, TriggeredMessageSequence sequence)
 {
     _routeOwningUrl = routeOwningUrl;
     _matcher = matcher;
     _sequence = sequence;
 }
Example #18
0
 public void AddInvocation(IInvocationMatcher matcher, IInvocationVoidCaller voidCaller)
 {
     _invocationVersusVoid.Add(matcher, voidCaller);
 }
Example #19
0
 void IWcfProxy.AddInvocation(IInvocationMatcher matcher, IInvocationVoidCaller voidCaller)
 {
     _serviceImplementation.AddInvocation(matcher, voidCaller);
 }
Example #20
0
 void IWcfProxy.AddInvocation(IInvocationMatcher matcher, IInvocationReturnValueProducer returnValueProducer)
 {
     _serviceImplementation.AddInvocation(matcher, returnValueProducer);
 }
 public InvocationTriggeringSequenceOfEvents(IInvocationMatcher matcher, TriggeredMessageSequence sequence)
 {
     _matcher  = matcher;
     _sequence = sequence;
 }