public void Init() { _handler = new ExtractHandledMessageHandler(m => _message = m); _execPipe = MockRepository.GenerateMock <IExecutionPipe>(); _context = MockRepository.GenerateMock <ILocalContext>(); _handlerCreator = MockRepository.GenerateMock <IMessageHandlerCreator>(); _handlerCreator.Stub(x => x.Create <SeparateMessage>(null)) .IgnoreArguments().Return(new [] { _handler }); _sut = new ExecutionModule(_execPipe, _handlerCreator, MockRepository.GenerateStub <IModuleManager>(), MockRepository.GenerateStub <IAsyncLibLog>(), _context); }
/// <summary> /// Initializes a new instance of the <see cref="ExecutionModule"/> class. /// </summary> public ExecutionModule( IExecutionPipe execPipe, IMessageHandlerCreator handlerCreator, IModuleManager moduleManager, IAsyncLibLog log, ILocalContext context) { _execPipe = execPipe; _handlerCreator = handlerCreator; _moduleManager = moduleManager; _log = log; _context = context; }