Clover Coverage Report
Coverage timestamp: Fri May 24 2013 13:47:27 UTC
21   71   5   4.2
0   39   0.24   5
5     1  
1    
 
  ConditionalProofVoTest       Line # 27 21 5 100% 1.0
 
  (4)
 
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.ConditionalProofVo}.
24    *
25    * @author Michael Meyling
26    */
 
27    public class ConditionalProofVoTest extends AbstractVoModuleTestCase {
28   
29    /** This class is tested. */
30    private Class clazz = ConditionalProofVo.class;
31   
32    private ConditionalProofVo vo1;
33    private ConditionalProofVo vo2;
34   
 
35  4 toggle protected void setUp() throws Exception {
36  4 super.setUp();
37  4 removeMethodToCheck("getFormula");
38  4 removeMethodToCheck("getLabel");
39  4 removeMethodToCheck("getConditionalProof");
40  4 removeMethodToCheck("getReason");
41  4 removeMethodToCheck("getName");
42  4 removeMethodToCheck("getReferences");
43  4 vo1 = new ConditionalProofVo();
44  4 vo1.setConclusion(new ConclusionVo("first", new FormulaVo(new DefaultAtom("dummy"))));
45  4 vo2 = new ConditionalProofVo(null, null, null);
46    }
47   
 
48  73 toggle protected Class getTestedClass() {
49  73 return clazz;
50    }
51   
 
52  1 toggle public void testGetLabel() {
53  1 assertEquals("first", vo1.getLabel());
54  1 assertEquals(null, vo2.getLabel());
55    }
56   
 
57  1 toggle public void testGetFormula() {
58  1 assertEquals(new FormulaVo(new DefaultAtom("dummy")), vo1.getFormula());
59  1 assertEquals(null, vo2.getFormula());
60    }
61   
 
62  1 toggle public void testUnuasalGetter() {
63  1 assertTrue(EqualsUtility.equals(new FormulaVo(new DefaultAtom("dummy")), vo1.getFormula()));
64  1 assertTrue(EqualsUtility.equals("first", vo1.getLabel()));
65  1 assertTrue(EqualsUtility.equals(vo1, vo1.getConditionalProof()));
66  1 assertTrue(EqualsUtility.equals(vo1, vo1.getReason()));
67  1 assertTrue(EqualsUtility.equals("CP", vo1.getName()));
68  1 assertTrue(EqualsUtility.equals(new String[] {}, vo1.getReferences()));
69    }
70   
71    }