Clover Coverage Report
Coverage timestamp: Fri May 24 2013 13:47:27 UTC
17   72   6   2.83
0   38   0.35   6
6     1  
1    
 
  ConclusionVoTest       Line # 27 17 6 100% 1.0
 
  (5)
 
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    import org.qedeq.kernel.se.dto.list.DefaultAtom;
20   
21   
22    /**
23    * Test class {@link org.qedeq.kernel.se.dto.module.HypothesisVo}.
24    *
25    * @author Michael Meyling
26    */
 
27    public class ConclusionVoTest extends AbstractVoModuleTestCase {
28   
29    /** This class is tested. */
30    private Class clazz = HypothesisVo.class;
31   
32    private ConclusionVo v0;
33   
34    private ConclusionVo v1;
35   
36    private ConclusionVo v2;
37   
 
38  5 toggle protected void setUp() throws Exception {
39  5 super.setUp();
40  5 v0 = new ConclusionVo(null, null);
41  5 v1 = new ConclusionVo("first", new FormulaVo(new DefaultAtom("dummy")));
42  5 v2 = new ConclusionVo(new FormulaVo(new DefaultAtom("dummy")));
43    }
44   
 
45  51 toggle protected Class getTestedClass() {
46  51 return clazz;
47    }
48   
 
49  1 toggle public void testGetLabel() {
50  1 assertNull(v0.getLabel());
51  1 assertEquals("first", v1.getLabel());
52  1 assertNull(v2.getLabel());
53    }
54   
 
55  1 toggle public void testGetFormula() {
56  1 assertNull(v0.getFormula());
57  1 assertTrue(EqualsUtility.equals(new FormulaVo(new DefaultAtom("dummy")), v1.getFormula()));
58  1 assertTrue(EqualsUtility.equals(new FormulaVo(new DefaultAtom("dummy")), v2.getFormula()));
59    }
60   
 
61  1 toggle public void testHashCode() {
62  1 assertFalse(v0.hashCode() == v1.hashCode());
63  1 assertFalse(v2.hashCode() == v1.hashCode());
64  1 assertFalse(v0.hashCode() == v2.hashCode());
65    }
66   
 
67  1 toggle public void testToString() {
68  1 assertEquals(" null Conclusion", v0.toString());
69  1 assertEquals("[first] \"dummy\" Conclusion", v1.toString());
70  1 assertEquals(" \"dummy\" Conclusion", v2.toString());
71    }
72    }