}
public void testGetAttributeAsBoolean()
throws Exception
{
final DefaultConfiguration configuration =
new DefaultConfiguration( "myElement", "file.xml:20", "" );
final String key = "key";
final String value = "true";
configuration.setAttribute( key, value );
assertEquals( "getAttribute('key')",
true,
configuration.getAttributeAsBoolean( key ) );
assertEquals( "getAttribute('key','false')",
true,
configuration.getAttributeAsBoolean( key, false ) );
}