Package org.apache.felix.ipojo

Examples of org.apache.felix.ipojo.ComponentFactory.start()


    }
   
    public void testNoField() {
        try {
            ComponentFactory cf = new ComponentFactory(getContext(), getNoField());
            cf.start();
            ComponentInstance ci = cf.createComponentInstance(props);
            ci.dispose();
            cf.stop();
            fail("A service requirement with neither field and method must be rejected " + cf);
        } catch (ConfigurationException e) {
View Full Code Here


    }
   
    public void testBadField() {
        try {
            ComponentFactory cf = new ComponentFactory(getContext(), getBadField());
            cf.start();
            ComponentInstance ci = cf.createComponentInstance(props);
            ci.dispose();
            cf.stop();
            fail("A service requirement with a bad field must be rejected " + cf);
        }catch (ConfigurationException e) {
View Full Code Here

    }
   
    public void testBadFilter() {
        try {
            ComponentFactory cf = new ComponentFactory(getContext(), getBadFilter());
            cf.start();
            ComponentInstance ci = cf.createComponentInstance(props);
            ci.dispose();
            cf.stop();
            fail("A service requirement with a bad filter must be rejected " + cf);
        }catch (ConfigurationException e) {
View Full Code Here

    }
   
    public void testBadFrom() {
        try {
            ComponentFactory cf = new ComponentFactory(getContext(), getBadFrom());
            cf.start();
            ComponentInstance ci = cf.createComponentInstance(props);
            ci.dispose();
            cf.stop();
            fail("A service requirement with a bad from must be rejected " + cf);
        }catch (ConfigurationException e) {
View Full Code Here

    }
   
    public void testBadType() {
        try {
            ComponentFactory cf = new ComponentFactory(getContext(), getBadType());
            cf.start();
            ComponentInstance ci = cf.createComponentInstance(props);
            ci.dispose();
            cf.stop();
            fail("A service requirement with a bad type must be rejected " + cf);
        }catch (ConfigurationException e) {
View Full Code Here

    }
   
    public void testNothing() {
        try {
            ComponentFactory cf = new ComponentFactory(getContext(), getNothing());
            cf.start();
            ComponentInstance ci = cf.createComponentInstance(props);
            ci.dispose();
            cf.stop();
            fail("A lifecycle callback with a missing method and transition must be rejected " + cf);
        } catch (ConfigurationException e) {
View Full Code Here

    }
   
    public void testNoTransition() {
        try {
            ComponentFactory cf = new ComponentFactory(getContext(), getNoTransition());
            cf.start();
            ComponentInstance ci = cf.createComponentInstance(props);
            ci.dispose();
            cf.stop();
            fail("A lifecycle callback with a missing transition must be rejected " + cf);
        } catch (ConfigurationException e) {
View Full Code Here

    }
   
    public void testNoMethod() {
        try {
            ComponentFactory cf = new ComponentFactory(getContext(), getNoMethod());
            cf.start();
            ComponentInstance ci = cf.createComponentInstance(props);
            ci.dispose();
            cf.stop();
            fail("A lifecycle callback with a missing method must be rejected " + cf);
        }catch (ConfigurationException e) {
View Full Code Here

    }
   
    public void testBadMethod() {
        try {
            ComponentFactory cf = new ComponentFactory(getContext(), getBadMethod());
            cf.start();
            ComponentInstance ci = cf.createComponentInstance(props);
            if (ci.isStarted()) {
                fail("A lifecycle callback with a bad method must be rejected (instance stills valid)" + cf);
            }
            ci.dispose();
View Full Code Here

    }
   
    public void testBadMethod2() {
        try {
            ComponentFactory cf = new ComponentFactory(getContext(), getBadMethod2());
            cf.start();
            ComponentInstance ci = cf.createComponentInstance(props);
            ci.stop();
            if (ci.isStarted()) {
                fail("A lifecycle callback with a bad method must be rejected (instance stills valid)" + cf);
            }
View Full Code Here

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.