/* JFox, the OpenSource J2EE Application Server
 *
 * Distributable under GNU LGPL license by gun.org
 * more details please visit http://www.huihoo.org/jfox
 */

package org.jfox.framework;

import junit.framework.TestCase;
import org.jfox.framework.extra.NamedConstrComponentFactory;

/**
 * @author <a href="mailto:young_yy@hotmail.com">Young Yang</a>
 */

public class NamedConstructorComponentFactoryTest extends TestCase {
    NamedConstrComponentFactory namedConstructorComponentFactory;

    public void setUp() throws Exception {
        super.setUp();
        namedConstructorComponentFactory = new NamedConstrComponentFactory(ComponentName.newInstance(TestComponentA.class, "default"), new Parameter[0]);
        namedConstructorComponentFactory.setRegistry(Registry.getInstance());
    }

    public void tearDown() throws Exception {
        super.setUp();
    }

    public void testMakeComponent() throws Exception {
        Component comp = namedConstructorComponentFactory.makeComponent();
        System.out.println("Component: " + comp);
    }

    public void testComponentName() {
        System.out.println("ComponentName: " + namedConstructorComponentFactory.getComponentName());
    }

}