Example #1
0
        private void CovertToPdf(string reportPath, DisposableWorkSpace renderDirectory, PropertyPresenter <string, ErrorOutput> pdfPresenter)
        {
            var executor = new SynchronousAction(new DocxToPdfTask(_libreOffice, reportPath, renderDirectory.TmpPath),
                                                 new ProcessFactory());

            executor.Execute(pdfPresenter);
        }
        private void RenderReport(ReportGenerationArguments arguments,
                                  Func <string, ReportGenerationArguments, NodePipeLineTask> taskFactory,
                                  IRespondWithSuccessOrError <string, ErrorOutput> presenter)
        {
            var nodeAppPath = Fetch_NodeApp_Path(_options.NodeApp);

            var task = taskFactory.Invoke(nodeAppPath, arguments);

            var executor = new SynchronousAction(task, new ProcessFactory());

            executor.Execute(presenter);
        }
Example #3
0
        protected override void given_the_context_of()
        {
            method = Mock <IMethod>();
            method.Stub(x => x.Info).Return(typeof(object).GetMethod("ToString")).Repeat.Any();

            messageBinder = Mock <IMessageBinder>();
            filterManager = Stub <IFilterManager>();

            action = new SynchronousAction(
                Stub <IServiceLocator>(),
                method,
                messageBinder,
                filterManager,
                false
                );
        }
        protected override void given_the_context_of()
        {
            method = Mock<IMethod>();
            method.Stub(x => x.Info).Return(typeof(object).GetMethod("ToString")).Repeat.Any();

            messageBinder = Mock<IMessageBinder>();
            filterManager = Stub<IFilterManager>();

            action = new SynchronousAction(
                Stub<IServiceLocator>(),
                method,
                messageBinder,
                filterManager,
                false
                );
        }