junit.extensions
Interface ConfigurableTest

All Superinterfaces:
junit.framework.Test
All Known Implementing Classes:
ConfigurableTestCase, ConfigurableTestSetup

public interface ConfigurableTest
extends junit.framework.Test

Test that provides access to configuration parameters.

Author:
Siegfried GOESCHL, Dima STADNIK

Method Summary
 boolean getBoolean(java.lang.String key)
          Retrieves boolean number from configuration.
 byte getByte(java.lang.String key)
          Retrieves byte from configuration.
 char getChar(java.lang.String key)
          Retrieves character from configuration.
 double getDouble(java.lang.String key)
          Retrieves double number from configuration.
 float getFloat(java.lang.String key)
          Retrieves float number from configuration.
 int getInteger(java.lang.String key)
          Retrieves integer number from configuration.
 long getLong(java.lang.String key)
          Retrieves long number from configuration.
 short getShort(java.lang.String key)
          Retrieves short number from configuration.
 java.lang.String getString(java.lang.String key)
          Retrieves string from configuration.
 java.lang.String[] getStrings(java.lang.String key)
          Retrieves array of strings from configuration.
 
Methods inherited from interface junit.framework.Test
countTestCases, run
 

Method Detail

getBoolean

public boolean getBoolean(java.lang.String key)
                   throws java.lang.IllegalArgumentException
Retrieves boolean number from configuration.
Parameters:
key - Configuration parameter name.
Returns:
Boolean value of configuration parameter.
Throws:
java.lang.IllegalArgumentException - Parameter was not found or can't be retrieved.

getByte

public byte getByte(java.lang.String key)
             throws java.lang.IllegalArgumentException
Retrieves byte from configuration.
Parameters:
key - Configuration parameter name.
Returns:
Byte value of configuration parameter.
Throws:
java.lang.IllegalArgumentException - Parameter was not found or can't be retrieved.

getChar

public char getChar(java.lang.String key)
             throws java.lang.IllegalArgumentException
Retrieves character from configuration.
Parameters:
key - Configuration parameter name.
Returns:
Char value of configuration parameter.
Throws:
java.lang.IllegalArgumentException - Parameter was not found or can't be retrieved.

getDouble

public double getDouble(java.lang.String key)
                 throws java.lang.IllegalArgumentException
Retrieves double number from configuration.
Parameters:
key - Configuration parameter name.
Returns:
Double value of configuration parameter.
Throws:
java.lang.IllegalArgumentException - Parameter was not found or can't be retrieved.

getFloat

public float getFloat(java.lang.String key)
               throws java.lang.IllegalArgumentException
Retrieves float number from configuration.
Parameters:
name - Configuration parameter name.
Returns:
Float value of configuration parameter.
Throws:
java.lang.IllegalArgumentException - Parameter was not found or can't be retrieved.

getInteger

public int getInteger(java.lang.String key)
               throws java.lang.IllegalArgumentException
Retrieves integer number from configuration.
Parameters:
key - Configuration parameter name.
Returns:
Integer value of configuration parameter.
Throws:
java.lang.IllegalArgumentException - Parameter was not found or can't be retrieved.

getLong

public long getLong(java.lang.String key)
             throws java.lang.IllegalArgumentException
Retrieves long number from configuration.
Parameters:
key - Configuration parameter name.
Returns:
Long value of configuration parameter.
Throws:
java.lang.IllegalArgumentException - Parameter was not found or can't be retrieved.

getShort

public short getShort(java.lang.String key)
               throws java.lang.IllegalArgumentException
Retrieves short number from configuration.
Parameters:
key - Configuration parameter name.
Returns:
Short value of configuration parameter.
Throws:
java.lang.IllegalArgumentException - Parameter was not found or can't be retrieved.

getString

public java.lang.String getString(java.lang.String key)
                           throws java.lang.IllegalArgumentException
Retrieves string from configuration.
Parameters:
key - Configuration parameter name.
Returns:
String value of configuration parameter.
Throws:
java.lang.IllegalArgumentException - Parameter was not found or can't be retrieved.

getStrings

public java.lang.String[] getStrings(java.lang.String key)
                              throws java.lang.IllegalArgumentException
Retrieves array of strings from configuration.
Parameters:
key - Configuration parameter name.
Returns:
Value of configuration parameter as array of strings.
Throws:
java.lang.IllegalArgumentException - Parameter was not found or can't be retrieved.


Copyright © 2001-2002 IT20one GmbH. All Rights Reserved.