Package org.apache.felix.ipojo.manipulator

Examples of org.apache.felix.ipojo.manipulator.Reporter


        assertNotNull(root);
        assertEquals("my.Component", root.getAttribute("name"));
    }

    public void testNameAttribute() throws Exception {
        Reporter reporter = mock(Reporter.class);
        ComponentWorkbench workbench = new ComponentWorkbench(null, clazz());
        ComponentVisitor visitor = new ComponentVisitor(workbench, reporter);
        visitor.visit("name", "changed");
        visitor.visitEnd();
View Full Code Here


        assertNotNull(root);
        assertEquals("changed", root.getAttribute("name"));
    }

    public void testPublicFactoryDeprecationSupport() throws Exception {
        Reporter reporter = mock(Reporter.class);
        ComponentWorkbench workbench = new ComponentWorkbench(null, clazz());
        ComponentVisitor visitor = new ComponentVisitor(workbench, reporter);
        visitor.visit("public_factory", "false");
        visitor.visitEnd();
View Full Code Here

        assertNotNull(root);
        assertEquals("false", root.getAttribute("public"));
    }

    public void testFactoryMethodDeprecationSupport() throws Exception {
        Reporter reporter = mock(Reporter.class);
        ComponentWorkbench workbench = new ComponentWorkbench(null, clazz());
        ComponentVisitor visitor = new ComponentVisitor(workbench, reporter);
        visitor.visit("factory_method", "create");
        visitor.visitEnd();
View Full Code Here

* Time: 17:09
*/
public class MethodBindVisitorTestCase extends TestCase {

    public void testIdentifierProvided() throws Exception {
        Reporter reporter = mock(Reporter.class);
        ComponentWorkbench workbench = new ComponentWorkbench(null, type());
        MethodNode node = new MethodNode();
        node.name = "myMethod";

        MethodBindVisitor visitor = new MethodBindVisitor(workbench, Action.BIND, node, reporter);
View Full Code Here

        assertNotNull(workbench.getIds().get("my-identifier"));
    }

    public void testNoIdentifierButSpecificationAsAttributeProvided() throws Exception {
        Reporter reporter = mock(Reporter.class);
        ComponentWorkbench workbench = new ComponentWorkbench(null, type());
        MethodNode node = new MethodNode();
        node.name = "notify";
        node.desc = "()V";
View Full Code Here

        assertNotNull(workbench.getIds().get("my.Service"));
    }

    public void testNoIdentifierAndNoSpecificationProvided() throws Exception {
        Reporter reporter = mock(Reporter.class);
        ComponentWorkbench workbench = new ComponentWorkbench(null, type());
        MethodNode node = new MethodNode();
        node.name = "notify";
        node.desc = "()V";
View Full Code Here


        bind(HandlerDeclaration.class)
                .to(new AnnotationVisitorFactory() {
                    public AnnotationVisitor newAnnotationVisitor(BindingContext context) {
                        Reporter reporter = context.getReporter();
                        return new HandlerDeclarationVisitor(context.getWorkbench(), getFreshDocumentBuilder(reporter), reporter);
                    }
                });

        bind(Instantiate.class)
View Full Code Here

TOP

Related Classes of org.apache.felix.ipojo.manipulator.Reporter

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.