| 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 | */ |
| 11 | package org.jtiger.report.html; |
| 12 | |
| 13 | import org.jtiger.framework.ReadOnlyArray; |
| 14 | |
| 15 | final class FixtureResultsFactory |
| 16 | { |
| 17 | private FixtureResultsFactory() |
| 18 | { |
| 19 | |
| 20 | } |
| 21 | |
| 22 | static FixtureResults newFixtureResults(final String name, final String description, final String className, |
| 23 | final ReadOnlyArray<TestResult> testResults) |
| 24 | { |
| 25 | return new FixtureResultsImpl(name, description, className, testResults); |
| 26 | } |
| 27 | |
| 28 | private static final class FixtureResultsImpl implements FixtureResults |
| 29 | { |
| 30 | private final String name; |
| 31 | private final String description; |
| 32 | private final String className; |
| 33 | private final ReadOnlyArray<TestResult> testResults; |
| 34 | |
| 35 | FixtureResultsImpl(final String name, final String description, final String className, |
| 36 | final ReadOnlyArray<TestResult> testResults) |
| 37 | { |
| 38 | this.name = name; |
| 39 | this.description = description; |
| 40 | this.className = className; |
| 41 | this.testResults = testResults; |
| 42 | } |
| 43 | |
| 44 | public String getName() |
| 45 | { |
| 46 | return name; |
| 47 | } |
| 48 | |
| 49 | public String getDescription() |
| 50 | { |
| 51 | return description; |
| 52 | } |
| 53 | |
| 54 | public String getClassName() |
| 55 | { |
| 56 | return className; |
| 57 | } |
| 58 | |
| 59 | public ReadOnlyArray<TestResult> getTestResults() |
| 60 | { |
| 61 | return testResults; |
| 62 | } |
| 63 | } |
| 64 | } |