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

COVERAGE SUMMARY FOR SOURCE FILE [DefaultTestDefinitionFactory.java]

nameclass, %method, %block, %line, %
DefaultTestDefinitionFactory.java100% (2/2)100% (4/4)100% (18/18)100% (8/8)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class DefaultTestDefinitionFactory100% (1/1)100% (2/2)100% (7/7)100% (3/3)
DefaultTestDefinitionFactory (): void 100% (1/1)100% (3/3)100% (2/2)
newDefaultTestDefinition (): TestDefinition 100% (1/1)100% (4/4)100% (1/1)
     
class DefaultTestDefinitionFactory$DefaultTestDefinitionImpl100% (1/1)100% (2/2)100% (11/11)100% (5/5)
DefaultTestDefinitionFactory$DefaultTestDefinitionImpl (): void 100% (1/1)100% (3/3)100% (2/2)
isTest (Method): boolean 100% (1/1)100% (8/8)100% (3/3)

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.framework;
12 
13import java.lang.reflect.Method;
14 
15/**
16 * Provides a default implementation of defining a unit test case method.
17 * This implementation determines a test case method as having the {@link Test} annotation present.
18 *
19 * @see TestDefinition
20 * @author %javadoc.author.tag%
21 * @version %version%<br/>
22 *          <i>Build Number %build.number%</i><br/>
23 *          <i>Build Time %build.time% CET (GMT + 1)</i>
24 */
25public final class DefaultTestDefinitionFactory
26{
27    private DefaultTestDefinitionFactory()
28    {
29 
30    }
31 
32    /**
33     * Returns a new instance of the definition of a unit test case method.
34     *
35     * @return A new instance of the definition of a unit test case method.
36     */
37    public static TestDefinition newDefaultTestDefinition()
38    {
39        return new DefaultTestDefinitionImpl();
40    }
41 
42    private static final class DefaultTestDefinitionImpl implements TestDefinition
43    {
44        DefaultTestDefinitionImpl()
45        {
46 
47        }
48 
49        public boolean isTest(final Method m)
50        {
51            if(m == null)
52            {
53                return false;
54            }
55 
56            return m.isAnnotationPresent(Test.class);            
57        }
58    }
59}

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