Example #1
0
        public CallRouter(ISubstituteState substituteState, ISubstitutionContext context, IRouteFactory routeFactory)
        {
            _substituteState = substituteState;
            _context = context;
            _routeFactory = routeFactory;
            _receivedCalls = substituteState.ReceivedCalls;
            _resultSetter = substituteState.ResultSetter;

            UseDefaultRouteForNextCall();
        }
Example #2
0
                public void Run(IResultSetter resultSetter)
                {
                    var connection = Helpers.CreateConnection();

                    connection.ConnectionShutdown += (c, args) =>
                    {
                        resultSetter.ReplyCode = args.ReplyCode;
                        resultSetter.ReplyText = args.ReplyText;
                    };
                }
 public ReturnAutoValueForThisAndSubsequentCallsHandler(IEnumerable<IAutoValueProvider> autoValueProviders, IResultSetter resultSetter)
 {
     _autoValueProviders = autoValueProviders;
     _resultSetter = resultSetter;
 }
 public PropertySetterHandler(IPropertyHelper propertyHelper, IResultSetter resultSetter)
 {
     _propertyHelper = propertyHelper;
     _resultSetter = resultSetter;
 }