Clover Coverage Report
Coverage timestamp: Fri May 24 2013 13:47:27 UTC
19   76   7   2.71
0   42   0.37   7
7     1  
1    
 
  ModusPonensVoTest       Line # 26 19 7 100% 1.0
 
  (6)
 
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.dto.module;
17   
18    import org.qedeq.base.utility.EqualsUtility;
19   
20   
21    /**
22    * Test class {@link org.qedeq.kernel.se.dto.module.ModusPonensVo}.
23    *
24    * @author Michael Meyling
25    */
 
26    public class ModusPonensVoTest extends AbstractVoModuleTestCase {
27   
28    /** This class is tested. */
29    private Class clazz = ModusPonensVo.class;
30   
31    private ModusPonensVo mp1;
32    private ModusPonensVo mp2;
33   
 
34  6 toggle protected void setUp() throws Exception {
35  6 super.setUp();
36  6 removeMethodToCheck("getModusPonens");
37  6 removeMethodToCheck("getName");
38  6 removeMethodToCheck("getReferences");
39  6 mp1 = new ModusPonensVo("first", "second");
40  6 mp2 = new ModusPonensVo();
41    }
42   
 
43  58 toggle protected Class getTestedClass() {
44  58 return clazz;
45    }
46   
 
47  1 toggle public void testGetModusPonens() {
48  1 assertEquals(mp1, mp1.getModusPonens());
49  1 assertEquals(mp2, mp2.getModusPonens());
50    }
51   
 
52  1 toggle public void testGetName() {
53  1 assertEquals("MP", mp1.getName());
54  1 assertEquals("MP", mp2.getName());
55    }
56   
 
57  1 toggle public void testGetReference1() {
58  1 assertEquals("first", mp1.getReference1());
59  1 assertNull(mp2.getReference1());
60    }
61   
 
62  1 toggle public void testGetReference2() {
63  1 assertEquals("second", mp1.getReference2());
64  1 assertNull(mp2.getReference2());
65    }
66   
 
67  1 toggle public void testGetReferences() {
68  1 assertTrue(EqualsUtility.equals(new String[] {"first", "second"}, mp1.getReferences()));
69  1 assertTrue(EqualsUtility.equals(new String[] {}, mp2.getReferences()));
70  1 assertTrue(EqualsUtility.equals(new String[] {"first"},
71    new ModusPonensVo("first", null).getReferences()));
72  1 assertTrue(EqualsUtility.equals(new String[] {"second"},
73    new ModusPonensVo(null, "second").getReferences()));
74    }
75   
76    }