Clover Coverage Report
Coverage timestamp: Fri May 24 2013 13:47:27 UTC
8   72   6   2
4   25   0.75   4
4     1.5  
1    
 
  ExtendedGenerateLatexTest       Line # 27 8 6 93.8% 0.9375
 
  (3)
 
1    /* This file is part of the project "Hilbert II" - http://www.qedeq.org
2    *
3    * Copyright 2000-2013, Michael Meyling <mime@qedeq.org>.
4    *
5    * "Hilbert II" is free software; you can redistribute
6    * it and/or modify it under the terms of the GNU General Public
7    * License as published by the Free Software Foundation; either
8    * version 2 of the License, or (at your option) any later version.
9    *
10    * This program is distributed in the hope that it will be useful,
11    * but WITHOUT ANY WARRANTY; without even the implied warranty of
12    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13    * GNU General Public License for more details.
14    */
15   
16    package org.qedeq.kernel.bo.latex;
17   
18    import java.io.File;
19   
20    import org.qedeq.kernel.bo.service.control.QedeqBoFactoryTest;
21   
22    /**
23    * Test generating LaTeX files for all known samples.
24    *
25    * @author Michael Meyling
26    */
 
27    public final class ExtendedGenerateLatexTest extends GenerateLatexTest {
28   
 
29  10 toggle public void setUp() throws Exception {
30  10 super.setUp();
31    }
32   
 
33  10 toggle public void tearDown() throws Exception {
34  10 super.tearDown();
35    }
36   
37    /**
38    * Start main process.
39    *
40    * @throws Exception
41    */
 
42  1 toggle public void testGeneration() throws Exception {
43  1 if (slow()) {
44  1 super.testGeneration();
45    }
46    }
47   
48    /**
49    * Call the generation of one LaTeX file and copy XML source to same destination directory for
50    * all supported languages.
51    * <p>
52    * Tests also if the parsed context can be found by
53    * {@link org.qedeq.kernel.xml.mapper.Context2XPath#getXPath(ModuleContext)}.
54    *
55    * @param dir Start directory.
56    * @param xml Relative path to XML file. Must not be <code>null</code>.
57    * @param destinationDirectory Directory path for LaTeX file. Must not be <code>null</code>.
58    * @param onlyEn Generate only for language "en".
59    * @param ignoreWarnings Don't bother about warnings?
60    * @throws Exception Failure.
61    */
 
62  12 toggle public void generate(final File dir, final String xml,
63    final File destinationDirectory, final boolean onlyEn, final boolean ignoreWarnings)
64    throws Exception {
65  12 generate(dir, xml, "en", destinationDirectory, ignoreWarnings);
66  11 if (!onlyEn) {
67  7 generate(dir, xml, "de", destinationDirectory, ignoreWarnings);
68    }
69  11 QedeqBoFactoryTest.loadQedeqAndAssertContext(new File(dir, xml));
70    }
71   
72    }