Clover Coverage Report
Coverage timestamp: Fri May 24 2013 13:47:27 UTC
11   55   2   5.5
0   25   0.18   2
2     1  
1    
 
  DefaultContextCheckerTest       Line # 29 11 2 100% 1.0
 
  (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   
16    package org.qedeq.kernel.se.visitor;
17   
18    import org.qedeq.base.test.QedeqTestCase;
19    import org.qedeq.kernel.se.common.DefaultModuleAddress;
20    import org.qedeq.kernel.se.common.ModuleContext;
21    import org.qedeq.kernel.se.dto.module.HeaderVo;
22    import org.qedeq.kernel.se.dto.module.QedeqVo;
23   
24    /**
25    * Test class.
26    *
27    * @author Michael Meyling
28    */
 
29    public class DefaultContextCheckerTest extends QedeqTestCase {
30   
31    private DefaultContextChecker def;
32   
33    private QedeqVo qedeq;
34   
 
35  1 toggle public void setUp() throws Exception {
36  1 super.setUp();
37  1 this.qedeq = new QedeqVo();
38  1 final HeaderVo header = new HeaderVo();
39  1 header.setEmail("test@me");
40  1 this.qedeq.setHeader(header);
41  1 this.def = new DefaultContextChecker();
42    }
43   
44    /**
45    * Test hash code generation.
46    */
 
47  1 toggle public void testCheckHashCode() throws Exception {
48  1 def.checkContext(qedeq, new ModuleContext(DefaultModuleAddress.MEMORY));
49  1 def.checkContext(qedeq, new ModuleContext(DefaultModuleAddress.MEMORY, ".getHeader()"));
50  1 def.checkContext(qedeq, new ModuleContext(DefaultModuleAddress.MEMORY, ".getHeader().getEmail()"));
51  1 def.checkContext(qedeq, new ModuleContext(DefaultModuleAddress.MEMORY, ".getUnknown()"));
52  1 def.checkContext(qedeq, new ModuleContext(DefaultModuleAddress.MEMORY, ".getHeader("));
53    }
54   
55    }