Clover Coverage Report
Coverage timestamp: Sat Sep 18 2010 04:09:52 UTC
7   69   5   1.75
2   22   0.71   4
4     1.25  
1    
 
  ExtendedGenerateLatexTest       Line # 28 7 5 100% 1.0
 
  (2)
 
1    /* This file is part of the project "Hilbert II" - http://www.qedeq.org
2    *
3    * Copyright 2000-2010, 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.QedeqBoFactoryTest;
21   
22    /**
23    * Test generating LaTeX files for all known samples.
24    *
25    * @version $Revision: 1.1 $
26    * @author Michael Meyling
27    */
 
28    public final class ExtendedGenerateLatexTest extends GenerateLatexTest {
29   
 
30  8 toggle public void setUp() throws Exception {
31  8 super.setUp();
32    }
33   
 
34  8 toggle public void tearDown() throws Exception {
35  8 super.tearDown();
36    }
37   
38    /**
39    * Start main process.
40    *
41    * @throws Exception
42    */
 
43  1 toggle public void testGeneration() throws Exception {
44  1 super.testGeneration();
45    }
46   
47    /**
48    * Call the generation of one LaTeX file and copy XML source to same destination directory for
49    * all supported languages.
50    * <p>
51    * Tests also if the parsed context can be found by
52    * {@link org.qedeq.kernel.xml.mapper.Context2XPath#getXPath(ModuleContext)}.
53    *
54    * @param dir Start directory.
55    * @param xml Relative path to XML file. Must not be <code>null</code>.
56    * @param destinationDirectory Directory path for LaTeX file. Must not be <code>null</code>.
57    * @param onlyEn Generate only for language "en".
58    * @throws Exception Failure.
59    */
 
60  5 toggle public void generate(final File dir, final String xml,
61    final File destinationDirectory, final boolean onlyEn) throws Exception {
62  5 generate(dir, xml, "en", destinationDirectory);
63  5 if (!onlyEn) {
64  4 generate(dir, xml, "de", destinationDirectory);
65    }
66  5 QedeqBoFactoryTest.loadQedeqAndAssertContext(new File(dir, xml));
67    }
68   
69    }