|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ExtendedGenerateLatexTest | Line # 27 | 8 | 6 | 93.8% |
0.9375
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
(3) | |||
Result | |||
0.4375
|
org.qedeq.kernel.bo.latex.GenerateLatexTest.testGeneration org.qedeq.kernel.bo.latex.GenerateLatexTest.testGeneration | 1 PASS | |
0.3125
|
org.qedeq.kernel.bo.latex.GenerateLatexTest.testGeneration2 org.qedeq.kernel.bo.latex.GenerateLatexTest.testGeneration2 | 1 PASS | |
0.125
|
org.qedeq.kernel.bo.latex.GenerateLatexTest.testNegativeGeneration2 org.qedeq.kernel.bo.latex.GenerateLatexTest.testNegativeGeneration2 | 1 PASS | |
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 | public void setUp() throws Exception { |
30 | 10 | super.setUp(); |
31 | } | |
32 | ||
33 | 10 | public void tearDown() throws Exception { |
34 | 10 | super.tearDown(); |
35 | } | |
36 | ||
37 | /** | |
38 | * Start main process. | |
39 | * | |
40 | * @throws Exception | |
41 | */ | |
42 | 1 | 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 | 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 | } |
|