Clover Coverage Report
Coverage timestamp: Fri May 24 2013 13:47:27 UTC
12   72   4   3
0   30   0.33   4
4     1  
1    
 
  CheckRequiredModuleExceptionTest       Line # 27 12 4 100% 1.0
 
  (2)
 
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.control;
16   
17    import org.qedeq.base.test.QedeqTestCase;
18    import org.qedeq.kernel.bo.service.logic.CheckRequiredModuleException;
19    import org.qedeq.kernel.se.common.DefaultModuleAddress;
20    import org.qedeq.kernel.se.common.ModuleContext;
21   
22    /**
23    * Testing {@link CheckRequiredModuleException}.
24    *
25    * @author Michael Meyling
26    */
 
27    public class CheckRequiredModuleExceptionTest extends QedeqTestCase {
28   
29    /** Test instance 1. */
30    private CheckRequiredModuleException object1;
31   
32    /** Test instance 2. */
33    private CheckRequiredModuleException object2;
34   
35    /** Data for test instance 2. */
36    private ModuleContext context2;
37   
 
38  2 toggle protected void setUp() throws Exception {
39  2 super.setUp();
40  2 object1 = new CheckRequiredModuleException(0, "my message", null);
41  2 context2 = new ModuleContext(new DefaultModuleAddress("http://qedeq.org/0_03_12/doc/math/qedeq_logic_v1.xml"), "");
42  2 object2 = new CheckRequiredModuleException(0, "my 2. message", context2);
43    }
44   
 
45  2 toggle protected void tearDown() throws Exception {
46  2 super.tearDown();
47    }
48   
49    /**
50    * Test creator.
51    *
52    * @throws Exception Something bad happened.
53    */
 
54  1 toggle public void testCreator() throws Exception {
55  1 new CheckRequiredModuleException(0, "fname", null);
56  1 new CheckRequiredModuleException(0, "funame", null, null);
57    }
58   
59    /**
60    * Test getter.
61    *
62    * @throws Exception Something bad happened.
63    */
 
64  1 toggle public void testGetter() throws Exception {
65  1 assertEquals(0, object1.getErrorCode());
66  1 assertEquals("my message", object1.getMessage());
67  1 assertEquals("my 2. message", object2.getMessage());
68  1 assertNull(object1.getContext());
69  1 assertEquals(context2, object2.getContext());
70    }
71   
72    }