EMMA Coverage Report (generated Sun Feb 05 10:43:15 CET 2012)
[all classes][de.uka.ipd.sdq.tcfmoop.tests]

COVERAGE SUMMARY FOR SOURCE FILE [OutputTests.java]

nameclass, %method, %block, %line, %
OutputTests.java0%   (0/1)0%   (0/5)0%   (0/89)0%   (0/21)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class OutputTests0%   (0/1)0%   (0/5)0%   (0/89)0%   (0/21)
OutputTests (): void 0%   (0/1)0%   (0/3)0%   (0/1)
setUp (): void 0%   (0/1)0%   (0/8)0%   (0/2)
testIsRoot (): void 0%   (0/1)0%   (0/14)0%   (0/4)
testParentAndChildren (): void 0%   (0/1)0%   (0/47)0%   (0/10)
testUpdateValue (): void 0%   (0/1)0%   (0/17)0%   (0/4)

1package de.uka.ipd.sdq.tcfmoop.tests;
2 
3import static org.junit.Assert.*;
4 
5import org.junit.Before;
6import org.junit.Test;
7 
8import de.uka.ipd.sdq.tcfmoop.outputtree.Node;
9import de.uka.ipd.sdq.tcfmoop.outputtree.Tree;
10import de.uka.ipd.sdq.tcfmoop.outputtree.Node.NodeType;
11 
12/**
13 * @author Atanas Dimitrov
14 *
15 */
16public class OutputTests {
17        Tree outputTree;
18        
19        /**
20         * @throws java.lang.Exception
21         */
22        @Before
23        public void setUp() throws Exception {
24                outputTree = new Tree("Root", NodeType.NON_SPECIFIC);
25        }
26 
27 
28        @Test
29        public void testParentAndChildren() {
30                assertFalse(outputTree.hasChildren());
31                
32                assertNull(outputTree.getParent());
33                
34                Node child1 = outputTree.addChild("Child 1", NodeType.NON_SPECIFIC);
35                
36                assertNotNull(child1);
37                
38                assertTrue(outputTree.hasChildren());
39                
40                assertTrue(outputTree.getChildren().size() == 1);
41                
42                assertTrue(child1.getParent() == outputTree);
43                
44                outputTree.clearChildren();
45                
46                assertFalse(outputTree.hasChildren());
47        }
48 
49        @Test
50        public void testUpdateValue() {        
51                
52                assertTrue(outputTree.getValue().equals("Root"));
53                
54                outputTree.updateValue("UpdatedRoot");
55                
56                assertTrue(outputTree.getValue().equals("UpdatedRoot"));
57                
58        }
59        
60        @Test
61        public void testIsRoot() {        
62                
63                assertTrue(outputTree.isRoot());
64                
65                Node child1 = outputTree.addChild("Child 1", NodeType.NON_SPECIFIC);
66                
67                assertFalse(child1.isRoot());
68                
69        }
70 
71}

[all classes][de.uka.ipd.sdq.tcfmoop.tests]
EMMA 2.0.9414 (unsupported private build) (C) Vladimir Roubtsov