public ProductsController(IProductTasks productTasks, ICategoryTasks categoryTasks, IProductsQuery productsQuery, ICommandProcessor commandProcessor, ICaptchaTasks captchaTasks) { _productTasks = productTasks; _categoryTasks = categoryTasks; _productsQuery = productsQuery; _commandProcessor = commandProcessor; _captchaTasks = captchaTasks; }
public void Setup() { _productTasks = MockRepository.GenerateMock<IProductTasks>(); _categoryTasks = MockRepository.GenerateMock<ICategoryTasks>(); _productsQuery = MockRepository.GenerateMock<IProductsQuery>(); _commandProcessor = MockRepository.GenerateMock<ICommandProcessor>(); _captchaTasks = MockRepository.GenerateMock<ICaptchaTasks>(); _controller = new ProductsController(_productTasks, _categoryTasks, _productsQuery, _commandProcessor, _captchaTasks); }