public void ExportTest()
 {
     string inputSourceDirectory = FileInput("ExportGoBible");
     string outputDirectory = FileOutput("ExportGoBible");
     if(Directory.Exists(outputDirectory))
     {
         Directory.Delete(outputDirectory, true);
     }
     FolderTree.Copy(inputSourceDirectory, outputDirectory);
     Param.LoadSettings();
     _projInfo.ProjectPath = outputDirectory;
     _projInfo.ProjectInputType = "Scripture";
     _projInfo.DefaultXhtmlFileWithPath = Common.PathCombine(outputDirectory, "Go_Bible.xhtml");
     _projInfo.DefaultCssFileWithPath = Common.PathCombine(outputDirectory, "Go_Bible.css");
     
     var target = new ExportGoBible();
     const bool expectedResult = true;
     bool actual = target.Export(_projInfo);
     Assert.AreEqual(expectedResult, actual);
 }
Beispiel #2
0
        private void button11_Click(object sender, EventArgs e)
        {
            if (!File.Exists(txtInputPath.Text))
            {
                MessageBox.Show("Please enter the valid XHTML path");
                return;
            }
            ExportGoBible exportGoBible = new ExportGoBible();
            PublicationInformation projInfo = new PublicationInformation();

            projInfo.ProjectPath = Path.GetDirectoryName(txtInputPath.Text);
            projInfo.DefaultXhtmlFileWithPath = txtInputPath.Text;
            projInfo.DefaultCssFileWithPath = txtCSSInput.Text;

            projInfo.ProjectFileWithPath = projInfo.ProjectPath;
            projInfo.DictionaryPath = projInfo.ProjectPath;
            exportGoBible.Export(projInfo);
        }