@Test public void testChain() { Component c = new Component( "c" ); Component comp = new Component().name( "ins" ).installerName( "my-installer" ); comp.extendComponent( c ); Assert.assertEquals( "ins", comp.getName()); Assert.assertEquals( "my-installer", comp.getInstallerName()); Assert.assertEquals( c, comp.getExtendedComponent()); }
@Test public void testCrap() { Instance inst = new Instance(); Assert.assertNull( inst.toString()); Assert.assertNotNull( inst.name( "azerty" ).toString()); Component comp = new Component(); Assert.assertNull( comp.toString()); Assert.assertNotNull( comp.name( "azerty" ).toString()); Application app = new Application( new ApplicationTemplate()); Assert.assertNull( app.toString()); Assert.assertNotNull( app.name( "azerty" ).toString()); Assert.assertTrue( 0 < PreferenceKeyCategory.values().length ); } }