Package org.picocontainer.doc.tutorial.lifecycle

Source Code of org.picocontainer.doc.tutorial.lifecycle.LifecycleTestCase

package org.picocontainer.doc.tutorial.lifecycle;

import junit.framework.TestCase;
import org.picocontainer.MutablePicoContainer;
import org.picocontainer.defaults.DefaultPicoContainer;
import org.picocontainer.doc.tutorial.interfaces.Boy;

public class LifecycleTestCase extends TestCase {

    public void testStartStopDispose() {
        MutablePicoContainer pico = new DefaultPicoContainer();
        pico.registerComponentImplementation(Boy.class);
        pico.registerComponentImplementation(Girl.class);

// START SNIPPET: start
        pico.start();
// END SNIPPET: start

// START SNIPPET: stopdispose
        pico.stop();
        pico.dispose();
// END SNIPPET: stopdispose
    }


}
TOP

Related Classes of org.picocontainer.doc.tutorial.lifecycle.LifecycleTestCase

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.