コード例 #1
0
        public void Initialize()
        {
            _documentTypeRepositoryMock      = DocumentTypeRepositoryMock.GetDocumentTypeRepositoryMock();
            _generatedDocumentRepositoryMock = GeneratedDocumentRepositoryMock.GetGeneratedDocumentRepositoryMock();
            jsonContent             = new GenerateDocumentRequest();
            htmlContent             = new GenerateDocumentRequest();
            htmlGenerator           = new DocumentGenerator.Implementations.HtmlGenerator(new DocumentGenerator.Implementations.Helpers.HtmlGeneratorHelper());
            pdfGenerator            = new DocumentGenerator.Implementations.PdfGenerator();
            odtGenerator            = new DocumentGenerator.Implementations.OdtGenerator();
            docxGenerator           = new DocumentGenerator.Implementations.DocxGenerator();
            generatedDocumentLogger = new DocumentGenerator.Implementations.Helpers.GeneratedDocumentLogger(_generatedDocumentRepositoryMock.Object);
            templateGenerator       = new TemplateGenerator(new DocumentGenerator.Implementations.PdfGenerator(), new DocumentGenerator.Implementations.HtmlGenerator(new DocumentGenerator.Implementations.Helpers.HtmlGeneratorHelper()));
            documentGenerator       = new DocumentGenerator.Implementations.Generators.DocumentGenerator(_documentTypeRepositoryMock.Object, generatedDocumentLogger, htmlGenerator, pdfGenerator, odtGenerator, docxGenerator, templateGenerator);

            _templateVersionRepositoryMock = TemplateVersionRepositoryMock.GetTemplateVersionRepositoryMock();
            _folderRepositoryMock          = FolderRepositoryMock.GetFolderRepositoryMock();
            _templateRepositoryMock        = TemplateRepositoryMock.GetTemplateRepositoryMock();

            templateVersionManipulation = new TemplateVersionManipulation(_templateVersionRepositoryMock.Object);
            folderManipulation          = new FolderManipulation(_folderRepositoryMock.Object);
            templateManipulation        = new TemplateManipulation(_templateRepositoryMock.Object, templateVersionManipulation, folderManipulation);

            templateVersionManipulation = new TemplateVersionManipulation(_templateVersionRepositoryMock.Object);
            exportTemplateManipulation  = new ExportTemplateManipulation(templateManipulation, templateVersionManipulation, documentGenerator);
        }
コード例 #2
0
ファイル: TemplateManipulationTest.cs プロジェクト: adkl/nsi
        public void Initialize()
        {
            _templateVersionRepositoryMock = TemplateVersionRepositoryMock.GetTemplateVersionRepositoryMock();
            _folderRepositoryMock          = FolderRepositoryMock.GetFolderRepositoryMock();
            _templateRepositoryMock        = TemplateRepositoryMock.GetTemplateRepositoryMock();

            templateVersionManipulation = new TemplateVersionManipulation(_templateVersionRepositoryMock.Object);
            folderManipulation          = new FolderManipulation(_folderRepositoryMock.Object);

            templateManipulation = new TemplateManipulation(_templateRepositoryMock.Object, templateVersionManipulation, folderManipulation);
        }