org.apache.commons.configuration
Class InterpolationTestHelper

java.lang.Object
  extended by org.apache.commons.configuration.InterpolationTestHelper

public class InterpolationTestHelper
extends Object

A helper class that defines a bunch of tests related to variable interpolation. It can be used for running these tests on different configuration implementations.

Version:
$Id: InterpolationTestHelper.java 1222452 2011-12-22 21:06:17Z oheger $
Author:
Commons Configuration team

Constructor Summary
InterpolationTestHelper()
           
 
Method Summary
static void testGetInterpolator(AbstractConfiguration config)
          Tests accessing and manipulating the interpolator object.
static Configuration testInterpolatedConfiguration(AbstractConfiguration config)
          Tests obtaining a configuration with all variables replaced by their actual values.
static void testInterpolation(Configuration config)
          Tests basic interpolation facilities of the specified configuration.
static void testInterpolationConstants(Configuration config)
          Tests interpolation of constant values.
static void testInterpolationEscaped(Configuration config)
          Tests whether a variable can be escaped, so that it won't be interpolated.
static void testInterpolationLoop(Configuration config)
          Tests an invalid interpolation that results in an infinite loop.
static void testInterpolationSubset(Configuration config)
          Tests interpolation when a subset configuration is involved.
static void testInterpolationSystemProperties(Configuration config)
          Tests interpolation of system properties.
static void testInterpolationUnknownProperty(Configuration config)
          Tests interpolation when the referred property is not found.
static void testMultipleInterpolation(Configuration config)
          Tests an interpolation over multiple levels (i.e. the replacement of a variable is another variable and so on).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InterpolationTestHelper

public InterpolationTestHelper()
Method Detail

testInterpolation

public static void testInterpolation(Configuration config)
Tests basic interpolation facilities of the specified configuration.

Parameters:
config - the configuration to test

testMultipleInterpolation

public static void testMultipleInterpolation(Configuration config)
Tests an interpolation over multiple levels (i.e. the replacement of a variable is another variable and so on).

Parameters:
config - the configuration to test

testInterpolationLoop

public static void testInterpolationLoop(Configuration config)
Tests an invalid interpolation that results in an infinite loop. This loop should be detected and an exception should be thrown.

Parameters:
config - the configuration to test

testInterpolationSubset

public static void testInterpolationSubset(Configuration config)
Tests interpolation when a subset configuration is involved.

Parameters:
config - the configuration to test

testInterpolationUnknownProperty

public static void testInterpolationUnknownProperty(Configuration config)
Tests interpolation when the referred property is not found.

Parameters:
config - the configuration to test

testInterpolationSystemProperties

public static void testInterpolationSystemProperties(Configuration config)
Tests interpolation of system properties.

Parameters:
config - the configuration to test

testInterpolationConstants

public static void testInterpolationConstants(Configuration config)
Tests interpolation of constant values.

Parameters:
config - the configuration to test

testInterpolationEscaped

public static void testInterpolationEscaped(Configuration config)
Tests whether a variable can be escaped, so that it won't be interpolated.

Parameters:
config - the configuration to test

testGetInterpolator

public static void testGetInterpolator(AbstractConfiguration config)
Tests accessing and manipulating the interpolator object.

Parameters:
config - the configuration to test

testInterpolatedConfiguration

public static Configuration testInterpolatedConfiguration(AbstractConfiguration config)
Tests obtaining a configuration with all variables replaced by their actual values.

Parameters:
config - the configuration to test
Returns:
the interpolated configuration


Copyright © 2001-2012 The Apache Software Foundation. All Rights Reserved.