CVS: jcontainer/loom/engine/src/test/org/jcontainer/loom/components/configuration/merger ConfigurationMergerTestCase.java,1.6,1.7
Peter Donald <pdonald-yCVjj/[email protected]> Mon, 26 Jan 2004 20:42:03 -0600
| Newsgroups | gmane.comp.java.jcontainer.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/jcontainer/jcontainer/loom/engine/src/test/org/jcontainer/loom/components/configuration/merger
In directory hogshead.codehaus.org:/tmp/cvs-serv7723/loom/engine/src/test/org/jcontainer/loom/components/configuration/merger
Modified Files:
ConfigurationMergerTestCase.java
Log Message:
Minor touchups
Index: ConfigurationMergerTestCase.java
===================================================================
RCS file: /cvsroot/jcontainer/jcontainer/loom/engine/src/test/org/jcontainer/loom/components/configuration/merger/ConfigurationMergerTestCase.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- ConfigurationMergerTestCase.java 3 Dec 2003 10:44:44 -0000 1.6
+++ ConfigurationMergerTestCase.java 27 Jan 2004 02:38:31 -0000 1.7
@@ -96,96 +96,94 @@
public class ConfigurationMergerTestCase
extends TestCase
{
- public ConfigurationMergerTestCase()
- {
- this( "Configuration merger and branching test" );
- }
-
- public ConfigurationMergerTestCase( String s )
- {
- super( s );
- }
-
public void testAttributeOnlyMerge()
throws Exception
{
- DefaultConfiguration result = new DefaultConfiguration( "a", "", "" );
+ final DefaultConfiguration result = new DefaultConfiguration( "a", "",
+ "" );
result.setAttribute( "a", "1" );
- DefaultConfiguration base = new DefaultConfiguration( "a", "", "" );
+ final DefaultConfiguration base = new DefaultConfiguration( "a", "",
+ "" );
base.setAttribute( "a", "2" );
- DefaultConfiguration layer = new DefaultConfiguration( "a", "", "" );
+ final DefaultConfiguration layer =
+ new DefaultConfiguration( "a", "", "" );
layer.setAttribute( "a", "1" );
assertTrue(
ConfigurationUtil.equals( result,
ConfigurationMerger.merge( layer, base ) ) );
- assertTrue(
- ConfigurationUtil.equals( layer,
- ConfigurationSplitter.split( result,
- base ) ) );
+ assertTrue( ConfigurationUtil.equals( layer,
+ ConfigurationSplitter.split(
+ result,
+ base ) ) );
}
public void testAddChild()
throws Exception
{
- DefaultConfiguration result = new DefaultConfiguration( "a", "", "" );
+ final DefaultConfiguration result =
+ new DefaultConfiguration( "a", "", "" );
result.addChild( new DefaultConfiguration( "kid1", "", "" ) );
result.addChild( new DefaultConfiguration( "kid2", "", "" ) );
- DefaultConfiguration base = new DefaultConfiguration( "a", "", "" );
+ final DefaultConfiguration base =
+ new DefaultConfiguration( "a", "", "" );
base.addChild( new DefaultConfiguration( "kid1", "", "" ) );
- DefaultConfiguration layer = new DefaultConfiguration( "a", "", "" );
+ final DefaultConfiguration layer = new DefaultConfiguration( "a", "",
+ "" );
layer.addChild( new DefaultConfiguration( "kid2", "", "" ) );
-
assertTrue(
ConfigurationUtil.equals( result,
ConfigurationMerger.merge( layer, base ) ) );
- assertTrue(
- ConfigurationUtil.equals( layer,
- ConfigurationSplitter.split( result,
- base ) ) );
+ assertTrue( ConfigurationUtil.equals( layer,
+ ConfigurationSplitter.split(
+ result,
+ base ) ) );
}
public void testOverrideChild()
throws Exception
{
- DefaultConfiguration result = new DefaultConfiguration( "a", "", "" );
- DefaultConfiguration rkid1 = new DefaultConfiguration( "kid1",
- "",
- "" );
+ final DefaultConfiguration result = new DefaultConfiguration( "a", "",
+ "" );
+ final DefaultConfiguration rkid1 = new DefaultConfiguration( "kid1",
+ "",
+ "" );
rkid1.setAttribute( "test", "1" );
result.addChild( rkid1 );
- DefaultConfiguration base = new DefaultConfiguration( "a", "", "" );
- DefaultConfiguration bkid1 = new DefaultConfiguration( "kid1",
- "",
- "" );
+ final DefaultConfiguration base = new DefaultConfiguration( "a", "",
+ "" );
+ final DefaultConfiguration bkid1 = new DefaultConfiguration( "kid1",
+ "",
+ "" );
bkid1.setAttribute( "test", "0" );
base.addChild( bkid1 );
- DefaultConfiguration layer = new DefaultConfiguration( "a", "", "" );
- DefaultConfiguration lkid1 = new DefaultConfiguration( "kid1",
- "",
- "" );
+ final DefaultConfiguration layer = new DefaultConfiguration( "a", "",
+ "" );
+ final DefaultConfiguration lkid1 = new DefaultConfiguration( "kid1",
+ "",
+ "" );
lkid1.setAttribute( "test", "1" );
layer.addChild( lkid1 );
- assertTrue(
- !ConfigurationUtil.equals( result,
- ConfigurationMerger.merge( layer,
- base ) ) );
+ assertTrue( !ConfigurationUtil.equals( result,
+ ConfigurationMerger.merge(
+ layer,
+ base ) ) );
lkid1.setAttribute( "excalibur-configuration:merge", "true" );
assertTrue(
ConfigurationUtil.equals( result,
ConfigurationMerger.merge( layer, base ) ) );
- assertTrue(
- ConfigurationUtil.equals( layer,
- ConfigurationSplitter.split( result,
- base ) ) );
+ assertTrue( ConfigurationUtil.equals( layer,
+ ConfigurationSplitter.split(
+ result,
+ base ) ) );
}
}