Clover Coverage Report
Coverage timestamp: Fri May 24 2013 13:47:27 UTC
10   55   3   3.33
0   23   0.3   3
3     1  
1    
 
  QedeqBoFormalLogicCheckerTest       Line # 29 10 3 84.6% 0.84615386
 
  (1)
 
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    package org.qedeq.kernel.bo.service.logic;
16   
17    import org.qedeq.kernel.bo.common.QedeqBo;
18    import org.qedeq.kernel.bo.test.QedeqBoTestCase;
19    import org.qedeq.kernel.se.common.DefaultModuleAddress;
20    import org.qedeq.kernel.se.common.ModuleAddress;
21   
22    /**
23    * For testing of loading required QEDEQ modules.
24    *
25    * FIXME m31 20100823: integrate some more unit tests here!
26    *
27    * @author Michael Meyling
28    */
 
29    public class QedeqBoFormalLogicCheckerTest extends QedeqBoTestCase {
30   
 
31  0 toggle public QedeqBoFormalLogicCheckerTest() {
32  0 super();
33    }
34   
 
35  1 toggle public QedeqBoFormalLogicCheckerTest(final String name) {
36  1 super(name);
37    }
38   
39    /**
40    * Check module that imports a module with logical errors.
41    *
42    * @throws Exception
43    */
 
44  1 toggle public void testCheckModule() throws Exception {
45  1 final ModuleAddress address = new DefaultModuleAddress(getFile("qedeq_error_sample_05.xml"));
46  1 getServices().checkWellFormedness(address);
47  1 final QedeqBo bo = getServices().getQedeqBo(address);
48  1 assertTrue(bo.getWellFormedState().isFailure());
49  1 assertNotNull(bo.getWarnings());
50  1 assertEquals(0, bo.getWarnings().size());
51  1 assertEquals(1, bo.getErrors().size());
52  1 assertEquals(11231, bo.getErrors().get(0).getErrorCode());
53    }
54   
55    }