Clover Coverage Report
Coverage timestamp: Sa Aug 2 2008 13:56:27 CEST
7   93   5   1,75
2   42   0,71   4
4     1,25  
1    
 
  ExtendedGenerateLatexTest       Line # 49 7 5 100% 1.0
 
  (2)
 
1    /* $Id: ExtendedGenerateLatexTest.java,v 1.1 2008/07/26 07:59:18 m31 Exp $
2    *
3    * This file is part of the project "Hilbert II" - http://www.qedeq.org
4    *
5    * Copyright 2000-2008, Michael Meyling <mime@qedeq.org>.
6    *
7    * "Hilbert II" is free software; you can redistribute
8    * it and/or modify it under the terms of the GNU General Public
9    * License as published by the Free Software Foundation; either
10    * version 2 of the License, or (at your option) any later version.
11    *
12    * This program is distributed in the hope that it will be useful,
13    * but WITHOUT ANY WARRANTY; without even the implied warranty of
14    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15    * GNU General Public License for more details.
16    */
17   
18    package org.qedeq.kernel.bo.latex;
19   
20    import java.io.File;
21    import java.io.IOException;
22    import java.io.InputStream;
23   
24    import org.qedeq.base.io.IoUtility;
25    import org.qedeq.base.test.QedeqTestCase;
26    import org.qedeq.base.trace.Trace;
27    import org.qedeq.kernel.bo.QedeqBo;
28    import org.qedeq.kernel.bo.control.QedeqBoFactoryTest;
29    import org.qedeq.kernel.bo.logic.wf.LogicalCheckException;
30    import org.qedeq.kernel.bo.module.InternalKernelServices;
31    import org.qedeq.kernel.bo.module.KernelQedeqBo;
32    import org.qedeq.kernel.bo.service.DefaultModuleAddress;
33    import org.qedeq.kernel.bo.service.latex.Qedeq2Latex;
34    import org.qedeq.kernel.bo.service.latex.QedeqBoDuplicateLanguageChecker;
35    import org.qedeq.kernel.bo.test.KernelFacade;
36    import org.qedeq.kernel.common.DefaultSourceFileExceptionList;
37    import org.qedeq.kernel.common.ModuleAddress;
38    import org.qedeq.kernel.common.ModuleDataException;
39    import org.qedeq.kernel.common.SourceFileException;
40    import org.qedeq.kernel.common.SourceFileExceptionList;
41    import org.xml.sax.SAXParseException;
42   
43    /**
44    * Test generating LaTeX files for all known samples.
45    *
46    * @version $Revision: 1.1 $
47    * @author Michael Meyling
48    */
 
49    public final class ExtendedGenerateLatexTest extends GenerateLatexTest {
50   
51    /** This class. */
52    private static final Class CLASS = ExtendedGenerateLatexTest.class;
53   
 
54  8 toggle public void setUp() throws Exception {
55  8 super.setUp();
56    }
57   
 
58  8 toggle public void tearDown() throws Exception {
59  8 super.tearDown();
60    }
61   
62    /**
63    * Start main process.
64    *
65    * @throws Exception
66    */
 
67  1 toggle public void testGeneration() throws Exception {
68  1 super.testGeneration();
69    }
70   
71    /**
72    * Call the generation of one LaTeX file and copy XML source to same destination directory for
73    * all supported languages.
74    * <p>
75    * Tests also if the parsed context can be found by
76    * {@link org.qedeq.kernel.xml.mapper.Context2XPath#getXPath(ModuleContext)}.
77    *
78    * @param dir Start directory.
79    * @param xml Relative path to XML file. Must not be <code>null</code>.
80    * @param destinationDirectory Directory path for LaTeX file. Must not be <code>null</code>.
81    * @param onlyEn Generate only for language "en".
82    * @throws Exception Failure.
83    */
 
84  5 toggle public void generate(final File dir, final String xml,
85    final File destinationDirectory, final boolean onlyEn) throws Exception {
86  5 generate(dir, xml, "en", destinationDirectory);
87  5 if (!onlyEn) {
88  4 generate(dir, xml, "de", destinationDirectory);
89    }
90  5 QedeqBoFactoryTest.loadQedeqAndAssertContext(new File(dir, xml));
91    }
92   
93    }