EMMA Coverage Report (generated Fri Jul 28 01:51:09 CEST 2006)
[all classes][org.jtiger.report.html]

COVERAGE SUMMARY FOR SOURCE FILE [OverallTotalFactory.java]

nameclass, %method, %block, %line, %
OverallTotalFactory.java100% (2/2)100% (10/10)100% (141/141)100% (37/37)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class OverallTotalFactory100% (1/1)100% (2/2)100% (14/14)100% (5/5)
OverallTotalFactory (): void 100% (1/1)100% (3/3)100% (2/2)
newOverallTotal (FixtureResults): OverallTotal 100% (1/1)100% (11/11)100% (3/3)
     
class OverallTotalFactory$OverallTotalImpl100% (1/1)100% (8/8)100% (127/127)100% (32/32)
OverallTotalFactory$OverallTotalImpl (FixtureResults): void 100% (1/1)100% (106/106)100% (25/25)
getFailure (): long 100% (1/1)100% (3/3)100% (1/1)
getFailureSetUp (): long 100% (1/1)100% (3/3)100% (1/1)
getFailureTearDown (): long 100% (1/1)100% (3/3)100% (1/1)
getIgnoredAnnotated (): long 100% (1/1)100% (3/3)100% (1/1)
getIgnoredCannotInvoke (): long 100% (1/1)100% (3/3)100% (1/1)
getSuccess (): long 100% (1/1)100% (3/3)100% (1/1)
getTotal (): long 100% (1/1)100% (3/3)100% (1/1)

1/*
2 * JTiger Unit Testing Framework for J2SE 1.5
3 * Copyright (C) 2005 Tony Morris
4 *
5 * This software is licenced under the
6 * Common Public Licence version 1.0
7 * http://www.opensource.org/licenses/cpl1.0.php
8 *
9 * You received a copy of this licence with this software.
10 */
11package org.jtiger.report.html;
12 
13import org.jtiger.framework.TestResultType;
14import static org.jtiger.framework.TestResultType.SUCCESS;
15import static org.jtiger.framework.TestResultType.FAILURE;
16import static org.jtiger.framework.TestResultType.FAILURE_SETUP;
17import static org.jtiger.framework.TestResultType.FAILURE_TEARDOWN;
18import static org.jtiger.framework.TestResultType.IGNORED_ANNOTATED;
19import static org.jtiger.framework.TestResultType.IGNORED_CANNOT_INVOKE;
20 
21final class OverallTotalFactory
22{
23    private OverallTotalFactory()
24    {
25 
26    }
27 
28    static OverallTotal newOverallTotal(final org.jtiger.framework.FixtureResults results) throws NullPointerException
29    {
30        if(results == null)
31        {
32            throw new NullPointerException();
33        }
34 
35        return new OverallTotalImpl(results);
36    }
37 
38    private static final class OverallTotalImpl implements OverallTotal
39    {
40        private long success;
41        private long failure;
42        private long failureSetUp;
43        private long failureTearDown;
44        private long ignoredAnnotated;
45        private long ignoredCannotInvoke;
46        private final long total;
47 
48        OverallTotalImpl(final org.jtiger.framework.FixtureResults results)
49        {
50            for(org.jtiger.framework.FixtureResult result : results)
51            {
52                for(org.jtiger.framework.TestResult tr : result)
53                {
54                    final TestResultType r = tr.getTestResultType();
55 
56                    if(r == SUCCESS)
57                    {
58                        success++;
59                    }
60                    else if(r == FAILURE)
61                    {
62                        failure++;
63                    }
64                    else if(r == FAILURE_SETUP)
65                    {
66                        failureSetUp++;
67                    }
68                    else if(r == FAILURE_TEARDOWN)
69                    {
70                        failureTearDown++;
71                    }
72                    else if(r == IGNORED_ANNOTATED)
73                    {
74                        ignoredAnnotated++;
75                    }
76                    else if(r == IGNORED_CANNOT_INVOKE)
77                    {
78                        ignoredCannotInvoke++;
79                    }
80                }
81            }
82 
83            total = success + failure + failureSetUp + failureTearDown + ignoredAnnotated + ignoredCannotInvoke;
84        }
85 
86        public long getSuccess()
87        {
88            return success;
89        }
90 
91        public long getFailure()
92        {
93            return failure;
94        }
95 
96        public long getFailureSetUp()
97        {
98            return failureSetUp;
99        }
100 
101        public long getFailureTearDown()
102        {
103            return failureTearDown;
104        }
105 
106        public long getIgnoredAnnotated()
107        {
108            return ignoredAnnotated;
109        }
110 
111        public long getIgnoredCannotInvoke()
112        {
113            return ignoredCannotInvoke;
114        }
115 
116        public long getTotal()
117        {
118            return total;
119        }
120    }
121}

[all classes][org.jtiger.report.html]
EMMA 2.0.5312 (C) Vladimir Roubtsov