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

COVERAGE SUMMARY FOR SOURCE FILE [FixtureNameFactory.java]

nameclass, %method, %block, %line, %
FixtureNameFactory.java100% (2/2)100% (4/4)100% (37/37)100% (14/14)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class FixtureNameFactory100% (1/1)100% (2/2)100% (7/7)100% (3/3)
FixtureNameFactory (): void 100% (1/1)100% (3/3)100% (2/2)
newFixtureName (): FixtureName 100% (1/1)100% (4/4)100% (1/1)
     
class FixtureNameFactory$FixtureNameImpl100% (1/1)100% (2/2)100% (30/30)100% (11/11)
FixtureNameFactory$FixtureNameImpl (): void 100% (1/1)100% (3/3)100% (2/2)
getFixtureName (Class): String 100% (1/1)100% (27/27)100% (9/9)

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 
13final class FixtureNameFactory
14{
15    private FixtureNameFactory()
16    {
17 
18    }
19 
20    static FixtureName newFixtureName()
21    {
22        return new FixtureNameImpl();
23    }
24 
25    private static final class FixtureNameImpl implements FixtureName
26    {
27        FixtureNameImpl()
28        {
29 
30        }
31 
32        public String getFixtureName(final Class<?> c) throws NullPointerException
33        {
34            if(c == null)
35            {
36                throw new NullPointerException();
37            }
38 
39            final Fixture f = c.getAnnotation(Fixture.class);
40 
41            if(f == null)
42            {
43                return c.getCanonicalName();
44            }
45 
46            final String value = f.value();
47            
48            if(value.length() == 0)
49            {
50                return c.getCanonicalName();
51            }
52            else
53            {
54                return value;
55            }
56        }
57    }
58}

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