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.ant; |
12 | |
13 | /** |
14 | * An element used in {@link JTigerTask the Ant task} to specify a regular expression which categories of test cases are |
15 | * to be executed by the framework. Omitting this element from the build file causes test cases in any category to be |
16 | * executed. |
17 | * |
18 | * @see JTigerTask |
19 | * @author %javadoc.author.tag% |
20 | * @version %version%<br/> |
21 | * <i>Build Number %build.number%</i><br/> |
22 | * <i>Build Time %build.time% CET (GMT + 1)</i> |
23 | */ |
24 | public final class Category |
25 | { |
26 | private String regex; |
27 | |
28 | /** |
29 | * Create a default <tt>Category</tt>. |
30 | */ |
31 | public Category() |
32 | { |
33 | |
34 | } |
35 | |
36 | /** |
37 | * Create a <tt>Category</tt> with the given regular expression. |
38 | * |
39 | * @param regex The regular expression of the <tt>Category</tt>. |
40 | */ |
41 | public Category(final String regex) |
42 | { |
43 | setRegex(regex); |
44 | } |
45 | |
46 | /** |
47 | * Returns the regular expression for this category. |
48 | * |
49 | * @return The regular expression for this category. |
50 | */ |
51 | public String getRegex() |
52 | { |
53 | return regex; |
54 | } |
55 | |
56 | /** |
57 | * Sets the regular expression for this category. |
58 | * |
59 | * @param regex The regular expression for this category. |
60 | */ |
61 | public void setRegex(final String regex) |
62 | { |
63 | this.regex = regex; |
64 | } |
65 | } |