org.apache.commons.configuration.beanutils
Class TestXMLBeanDeclaration

java.lang.Object
  extended by org.apache.commons.configuration.beanutils.TestXMLBeanDeclaration

public class TestXMLBeanDeclaration
extends Object

Test class for XMLBeanDeclaration.

Since:
1.3
Version:
$Id: TestXMLBeanDeclaration.java 1225643 2011-12-29 20:37:36Z oheger $
Author:
Commons Configuration team

Constructor Summary
TestXMLBeanDeclaration()
           
 
Method Summary
 void testGetBeanClassName()
          Tests fetching the bean's class name.
 void testGetBeanClassNameUndefined()
          Tests fetching the bean's class name if it is undefined.
 void testGetBeanFactoryName()
          Tests fetching the name of the bean factory.
 void testGetBeanFactoryNameUndefined()
          Tests fetching the name of the bean factory if it is undefined.
 void testGetBeanFactoryParameter()
          Tests fetching the parameter for the bean factory.
 void testGetBeanFactoryParameterUndefined()
          Tests fetching the parameter for the bean factory if it is undefined.
 void testGetBeanProperties()
          Tests if the bean's properties are correctly extracted from the configuration object.
 void testGetBeanPropertiesEmpty()
          Tests fetching properties if none are defined.
 void testGetBeanPropertiesWithReservedAttributes()
          Tests obtaining the bean's properties when reserved attributes are involved.
 void testGetInterpolatedBeanProperties()
          Tests whether interpolation of bean properties works.
 void testGetNestedBeanDeclarations()
          Tests fetching nested bean declarations.
 void testGetNestedBeanDeclarationsEmpty()
          Tests fetching nested bean declarations if none are defined.
 void testGetNestedBeanDeclarationsFactoryMethod()
          Tests whether the factory method for creating nested bean declarations gets called.
 void testInitFromMultiValueKey()
          Tests constructing a bean declaration from a key with multiple values.
 void testInitFromNullConfiguration()
          Tests creating a declaration from a null configuration.
 void testInitFromNullConfigurationAndKey()
          Tests creating a declaration from a null configuration with a key.
 void testInitFromNullConfigurationAndNode()
          Tests creating a declaration from a null configuration with a node.
 void testInitFromNullNode()
          Tests creating a declaration from a null node.
 void testInitFromUndefinedKey()
          Tests constructing a bean declaration from an undefined key.
 void testInitFromUndefinedKeyOptional()
          Tests constructing a bean declaration from a key, which is undefined when the optional flag is set.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestXMLBeanDeclaration

public TestXMLBeanDeclaration()
Method Detail

testInitFromNullNode

public void testInitFromNullNode()
Tests creating a declaration from a null node. This should cause an exception.


testInitFromNullConfiguration

public void testInitFromNullConfiguration()
Tests creating a declaration from a null configuration. This should cause an exception.


testInitFromNullConfigurationAndKey

public void testInitFromNullConfigurationAndKey()
Tests creating a declaration from a null configuration with a key. This should cause an exception.


testInitFromNullConfigurationAndNode

public void testInitFromNullConfigurationAndNode()
Tests creating a declaration from a null configuration with a node. This should cause an exception.


testGetBeanClassName

public void testGetBeanClassName()
Tests fetching the bean's class name.


testGetBeanClassNameUndefined

public void testGetBeanClassNameUndefined()
Tests fetching the bean's class name if it is undefined.


testGetBeanFactoryName

public void testGetBeanFactoryName()
Tests fetching the name of the bean factory.


testGetBeanFactoryNameUndefined

public void testGetBeanFactoryNameUndefined()
Tests fetching the name of the bean factory if it is undefined.


testGetBeanFactoryParameter

public void testGetBeanFactoryParameter()
Tests fetching the parameter for the bean factory.


testGetBeanFactoryParameterUndefined

public void testGetBeanFactoryParameterUndefined()
Tests fetching the parameter for the bean factory if it is undefined.


testGetBeanProperties

public void testGetBeanProperties()
Tests if the bean's properties are correctly extracted from the configuration object.


testGetBeanPropertiesWithReservedAttributes

public void testGetBeanPropertiesWithReservedAttributes()
Tests obtaining the bean's properties when reserved attributes are involved. These should be ignored.


testGetBeanPropertiesEmpty

public void testGetBeanPropertiesEmpty()
Tests fetching properties if none are defined.


testGetNestedBeanDeclarations

public void testGetNestedBeanDeclarations()
Tests fetching nested bean declarations.


testGetNestedBeanDeclarationsFactoryMethod

public void testGetNestedBeanDeclarationsFactoryMethod()
Tests whether the factory method for creating nested bean declarations gets called.


testGetNestedBeanDeclarationsEmpty

public void testGetNestedBeanDeclarationsEmpty()
Tests fetching nested bean declarations if none are defined.


testGetInterpolatedBeanProperties

public void testGetInterpolatedBeanProperties()
Tests whether interpolation of bean properties works.


testInitFromUndefinedKey

public void testInitFromUndefinedKey()
Tests constructing a bean declaration from an undefined key. This should cause an exception.


testInitFromUndefinedKeyOptional

public void testInitFromUndefinedKeyOptional()
Tests constructing a bean declaration from a key, which is undefined when the optional flag is set. In this case an empty declaration should be created, which can be used for creating beans as long as a default class is provided.


testInitFromMultiValueKey

public void testInitFromMultiValueKey()
Tests constructing a bean declaration from a key with multiple values. This should cause an exception because keys must be unique.



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