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