public DocumentController(IAuthorizationService authorizationService, IDocumentRepository documentRepository, ICustomerRepository customerRepository, IDocumentSaver documentSaver, IMappingEngine mappingEngine) { _authorizationService = authorizationService; _documentRepository = documentRepository; _customerRepository = customerRepository; _documentSaver = documentSaver; _mappingEngine = mappingEngine; }
protected override void Context() { base.Context(); AuthorizationService = MockRepository.GenerateStub<IAuthorizationService>(); Validator = MockRepository.GenerateStub<AbstractValidator<Document>>(); DocumentRepository = MockRepository.GenerateStub<IDocumentRepository>(); MappingEngine = MockRepository.GenerateStub<IMappingEngine>(); DocumentSaver = new DocumentSaver(AuthorizationService, Validator, DocumentRepository); }
protected override void Context() { base.Context(); DocumentSaver = MockRepository.GenerateStub<IDocumentSaver>(); MappingEngine = MockRepository.GenerateStub<IMappingEngine>(); DocumentController = new DocumentController(null, null, null, DocumentSaver, MappingEngine); DocumentController.ControllerContext = new ControllerContext(HttpContext, new RouteData(), DocumentController); }
public BatchPageProcessing( DocumentMetadata docData, IDocumentSaver saver, PreviewImageCreator imageCreator = null) : this() { _docData = docData; _saver = saver; _baseImage = _docData.CreateImage(); _imageCreator = imageCreator ?? new PreviewImageCreator(); _docData.DateFormatter.FormatChanged += UpdateAllDateLabels; this.numSkipInterval.Value = _docData.PageSkipInterval; _pagingControlSize = this.pnlPagedRowContainer.Size; }
public DocumentsReceiverWorker(Func <CancellationToken, IMessageConsumer <DocumentMessage> > messageQueueFactory, IDocumentSaver documentSaver) { documentsQueueFactory = messageQueueFactory ?? throw new ArgumentNullException(nameof(messageQueueFactory)); this.documentSaver = documentSaver ?? throw new ArgumentNullException(nameof(documentSaver)); }