예제 #1
0
        public void ScriptureExportTest()
        {
            string inputSourceDirectory = FileInput("ExportLO");
            string outputDirectory      = FileOutput("ExportLO");

            if (Directory.Exists(outputDirectory))
            {
                Directory.Delete(outputDirectory, true);
            }
            FolderTree.Copy(inputSourceDirectory, outputDirectory);
            Param.SetLoadType = "Scripture";
            Param.LoadSettings();
            _projInfo.ProjectPath              = outputDirectory;
            _projInfo.ProjectInputType         = "Scripture";
            _projInfo.DefaultXhtmlFileWithPath = Common.PathCombine(outputDirectory, "ScriptureInput.xhtml");
            _projInfo.DefaultCssFileWithPath   = Common.PathCombine(outputDirectory, "ScriptureInput.css");
            _projInfo.OutputExtension          = "odt";
            //EnableConfigurationSettings(outputDirectory);

            var        target         = new ExportLibreOffice();
            const bool expectedResult = true;
            bool       actual         = target.Export(_projInfo);

            Assert.AreEqual(expectedResult, actual);
        }
예제 #2
0
        public void UnderlineColorTest()
        {
            string inputSourceDirectory = FileInput("UnderlineColorTest");
            string outputDirectory      = FileOutput("UnderlineColorTest");

            if (Directory.Exists(outputDirectory))
            {
                Directory.Delete(outputDirectory, true);
            }
            FolderTree.Copy(inputSourceDirectory, outputDirectory);
            Param.LoadSettings();
            _projInfo.ProjectPath              = outputDirectory;
            _projInfo.ProjectInputType         = "Dictionary";
            _projInfo.DefaultXhtmlFileWithPath = Common.PathCombine(outputDirectory, "main.xhtml");
            _projInfo.DefaultCssFileWithPath   = Common.PathCombine(outputDirectory, "main.css");
            _projInfo.OutputExtension          = "odt";

            var        target         = new ExportLibreOffice();
            const bool expectedResult = true;
            bool       actual         = target.Export(_projInfo);

            Assert.AreEqual(expectedResult, actual);
        }