1 /*
2 * Copyright (c) 2001 by
3 * Siegfried GOESCHL <mailto:siegfried.goeschl@itserv.at>
4 * and Dima STADNIK <mailto:5d5@mail.ru>
5 *
6 * This program is free software.
7 *
8 * You may redistribute it and/or modify it under the terms of the GNU
9 * General Public License as published by the Free Software Foundation.
10 * Version 2 of the license should be included with this distribution in
11 * the file LICENSE, as well as License.html. If the license is not
12 * included with this distribution, you may find a copy at the FSF web
13 * site at 'www.gnu.org' or 'www.fsf.org', or you may write to the
14 * Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139 USA.
15 *
16 * THIS SOFTWARE IS PROVIDED AS-IS WITHOUT WARRANTY OF ANY KIND,
17 * NOT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY. THE AUTHOR
18 * OF THIS SOFTWARE, ASSUMES _NO_ RESPONSIBILITY FOR ANY
19 * CONSEQUENCE RESULTING FROM THE USE, MODIFICATION, OR
20 * REDISTRIBUTION OF THIS SOFTWARE.
21 */
22
23 package junit.extensions;
24
25
26 import junit.framework.Test;
27
28
29 /***
30 * Test that provides access to configuration parameters.
31 *
32 * @author Siegfried GOESCHL
33 * @author Dima STADNIK
34 */
35 public interface ConfigurableTest extends Test {
36
37 /***
38 * Retrieves boolean number from configuration.
39 *
40 * @param key Configuration parameter name.
41 * @return Boolean value of configuration parameter.
42 * @exception IllegalArgumentException Parameter was not found or can't be retrieved.
43 */
44 boolean getBoolean(String key) throws IllegalArgumentException;
45
46 /***
47 * Retrieves byte from configuration.
48 *
49 * @param key Configuration parameter name.
50 * @return Byte value of configuration parameter.
51 * @exception IllegalArgumentException Parameter was not found or can't be retrieved.
52 */
53 byte getByte(String key) throws IllegalArgumentException;
54
55 /***
56 * Retrieves character from configuration.
57 *
58 * @param key Configuration parameter name.
59 * @return Char value of configuration parameter.
60 * @exception IllegalArgumentException Parameter was not found or can't be retrieved.
61 */
62 char getChar(String key) throws IllegalArgumentException;
63
64 /***
65 * Retrieves double number from configuration.
66 *
67 * @param key Configuration parameter name.
68 * @return Double value of configuration parameter.
69 * @exception IllegalArgumentException Parameter was not found or can't be retrieved.
70 */
71 double getDouble(String key) throws IllegalArgumentException;
72
73 /***
74 * Retrieves float number from configuration.
75 *
76 * @param name Configuration parameter name.
77 * @return Float value of configuration parameter.
78 * @exception IllegalArgumentException Parameter was not found or can't be retrieved.
79 */
80 float getFloat(String key) throws IllegalArgumentException;
81
82 /***
83 * Retrieves integer number from configuration.
84 *
85 * @param key Configuration parameter name.
86 * @return Integer value of configuration parameter.
87 * @exception IllegalArgumentException Parameter was not found or can't be retrieved.
88 */
89 int getInteger(String key) throws IllegalArgumentException;
90
91 /***
92 * Retrieves long number from configuration.
93 *
94 * @param key Configuration parameter name.
95 * @return Long value of configuration parameter.
96 * @exception IllegalArgumentException Parameter was not found or can't be retrieved.
97 */
98 long getLong(String key) throws IllegalArgumentException;
99
100 /***
101 * Retrieves short number from configuration.
102 *
103 * @param key Configuration parameter name.
104 * @return Short value of configuration parameter.
105 * @exception IllegalArgumentException Parameter was not found or can't be retrieved.
106 */
107 short getShort(String key) throws IllegalArgumentException;
108
109 /***
110 * Retrieves string from configuration.
111 *
112 * @param key Configuration parameter name.
113 * @return String value of configuration parameter.
114 * @exception IllegalArgumentException Parameter was not found or can't be retrieved.
115 */
116 String getString(String key) throws IllegalArgumentException;
117
118 /***
119 * Retrieves array of strings from configuration.
120 *
121 * @param key Configuration parameter name.
122 * @return Value of configuration parameter as array of strings.
123 * @exception IllegalArgumentException Parameter was not found or can't be retrieved.
124 */
125 String[] getStrings(String key) throws IllegalArgumentException;
126 }
This page was automatically generated by Maven