Clover Coverage Report
Coverage timestamp: Sat Sep 18 2010 04:09:52 UTC
13   66   5   2.6
0   32   0.38   5
5     1  
1    
 
  QedeqBoFormalLogicCheckerTest       Line # 31 13 5 88.9% 0.8888889
 
  (1)
 
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    package org.qedeq.kernel.bo.service;
16   
17    import org.qedeq.base.test.QedeqTestCase;
18    import org.qedeq.kernel.bo.QedeqBo;
19    import org.qedeq.kernel.bo.context.KernelContext;
20    import org.qedeq.kernel.bo.test.KernelFacade;
21    import org.qedeq.kernel.common.DefaultModuleAddress;
22    import org.qedeq.kernel.common.ModuleAddress;
23   
24    /**
25    * For testing of loading required QEDEQ modules.
26    *
27    * FIXME m31 20100823: integrate some unit tests here!
28    *
29    * @author Michael Meyling
30    */
 
31    public class QedeqBoFormalLogicCheckerTest extends QedeqTestCase {
32   
 
33  1 toggle protected void setUp() throws Exception {
34  1 super.setUp();
35  1 KernelFacade.startup();
36    }
37   
 
38  1 toggle protected void tearDown() throws Exception {
39  1 KernelFacade.shutdown();
40  1 super.tearDown();
41    }
42   
 
43  0 toggle public QedeqBoFormalLogicCheckerTest() {
44  0 super();
45    }
46   
 
47  1 toggle public QedeqBoFormalLogicCheckerTest(final String name) {
48  1 super(name);
49    }
50   
51    /**
52    * Check module that imports a module with logical errors.
53    *
54    * @throws Exception
55    */
 
56  1 toggle public void testCheckModule() throws Exception {
57  1 final ModuleAddress address = new DefaultModuleAddress(getFile("qedeq_error_sample_05.xml"));
58  1 KernelContext.getInstance().checkModule(address);
59  1 final QedeqBo bo = KernelContext.getInstance().getQedeqBo(address);
60  1 assertTrue(bo.getLogicalState().isFailure());
61  1 assertNull(bo.getWarnings());
62  1 assertEquals(1, bo.getErrors().size());
63  1 assertEquals(11231, bo.getErrors().get(0).getErrorCode());
64    }
65   
66    }