1 /****************************************************************************** 2 * Copyright (C) PicoContainer Organization. All rights reserved. * 3 * ------------------------------------------------------------------------- * 4 * The software in this package is published under the terms of the BSD * 5 * style license a copy of which has been included with this distribution in * 6 * the LICENSE.txt file. * 7 * * 8 * Idea by Rachel Davies, Original code by Aslak Hellesoy and Paul Hammant * 9 *****************************************************************************/ 10 11 package picocontainer.hierarchical; 12 13 import junit.framework.TestCase; 14 import picocontainer.PicoInitializationException; 15 import picocontainer.PicoRegistrationException; 16 import picocontainer.testmodel.FredImpl; 17 import picocontainer.testmodel.WilmaImpl; 18 19 public class ComponentInteroperationTestCase extends TestCase { 20 21 public void testBasic() throws PicoInitializationException, PicoRegistrationException 22 { 23 24 WilmaImpl wilma = new WilmaImpl(); 25 OverriddenPicoTestContainer pico = new OverriddenPicoTestContainer(wilma); 26 27 pico.registerComponent(FredImpl.class); 28 pico.registerComponent(WilmaImpl.class); 29 30 pico.instantiateComponents(); 31 32 assertTrue("hello should have been called in wilma", wilma.helloCalled()); 33 } 34 35 36 }

This page was automatically generated by Maven