Package org.apache.felix.ipojo

Examples of org.apache.felix.ipojo.ComponentFactory$PrimitiveTypeDescription


        }
    }
   
    public void testBadField() {
        try {
            ComponentFactory cf = new ComponentFactory(getContext(), getBadFieldController());
            cf.start();
            cf.stop();
            fail("A lifecycle controller with a bad field must be rejected " + cf);
        } catch (Exception e) {
            // OK
        }
    }
View Full Code Here


        return elem;       
    }
   
    public void testBadFactory() {
        try {
            new ComponentFactory(getContext(), getElementFactoryWithNoClassName());
            fail("A factory with no class name must be rejected");
        } catch (ConfigurationException e) {
          // OK.  
        }
    }
View Full Code Here

   
    public void testNoManipulationMetadata() {
        Element elem = new Element("component", "");
        elem.addAttribute(new Attribute("classname", "org.apache.felix.ipojo.test.scenarios.component.CallbackCheckService"));
        try {
            ComponentFactory fact = new ComponentFactory(getContext(), elem);
            fact.stop();
            fail("A factory with no manipulation metadata must be rejected");
        } catch (ConfigurationException e) {
          // OK.
        }
    }
View Full Code Here

        return null;
    }
   
    public void testNothing() {
        try {
            ComponentFactory cf = new ComponentFactory(getContext(), getNothing());
            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) {
           // OK
        } catch (UnacceptableConfiguration e) {
            fail("Unexpected exception when creating an instance : " + e.getMessage());
View Full Code Here

        }
    }
   
    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) {
           // OK
        } catch (UnacceptableConfiguration e) {
            fail("Unexpected exception when creating an instance : " + e.getMessage());
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) {
           // OK
        } catch (UnacceptableConfiguration e) {
            fail("Unexpected exception when creating an instance : " + e.getMessage());
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) {
            //OK
        } catch (UnacceptableConfiguration e) {
            fail("Unexpected exception when creating an instance : " + e.getMessage());
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) {
            //OK
        } catch (UnacceptableConfiguration e) {
            fail("Unexpected exception when creating an instance : " + e.getMessage());
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) {
           // OK
        } catch (UnacceptableConfiguration e) {
            fail("Unexpected exception when creating an instance : " + e.getMessage());
View Full Code Here

        return null;
    }
   
    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) {
           // OK
        } catch (UnacceptableConfiguration e) {
            fail("Unexpected exception when creating an instance : " + e.getMessage());
View Full Code Here

TOP

Related Classes of org.apache.felix.ipojo.ComponentFactory$PrimitiveTypeDescription

Copyright © 2018 www.massapicom. 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.