Package org.apache.hivemind

Examples of org.apache.hivemind.ServiceImplementationFactoryParameters


    }

    public void testAutowireConstructorFailure() throws Exception
    {
        MockControl fpc = newControl(ServiceImplementationFactoryParameters.class);
        ServiceImplementationFactoryParameters fp = (ServiceImplementationFactoryParameters) fpc
                .getMock();

        MockControl mc = newControl(Module.class);
        Module module = (Module) mc.getMock();

        MockControl lc = newControl(Log.class);
        Log log = (Log) lc.getMock();

        fp.getLog();
        fpc.setReturnValue(log);

        fp.getServiceId();
        fpc.setReturnValue("foo");

        fp.getInvokingModule();
        fpc.setReturnValue(module, MockControl.ONE_OR_MORE);

        module.resolveType("hivemind.test.services.ConstructorAutowireTarget");
        mc.setReturnValue(ConstructorAutowireTarget.class);
View Full Code Here


        MockControl control = newControl(BeanFactory.class);
        BeanFactory beanFactory = (BeanFactory) control.getMock();

        MockControl fpc = newControl(ServiceImplementationFactoryParameters.class);
        ServiceImplementationFactoryParameters fp = (ServiceImplementationFactoryParameters) fpc
                .getMock();

        lf.setDefaultBeanFactory(beanFactory);

        SpringBeanParameter param = buildParameter("fred", null);

        Object fred = new Object();

        beanFactory.getBean("fred", List.class);
        control.setReturnValue(fred);

        fp.getFirstParameter();
        fpc.setReturnValue(param);

        fp.getServiceInterface();
        fpc.setReturnValue(List.class);

        replayControls();

        Object actual = lf.createCoreServiceImplementation(fp);
View Full Code Here

        MockControl control = newControl(BeanFactory.class);
        BeanFactory beanFactory = (BeanFactory) control.getMock();

        MockControl fpc = newControl(ServiceImplementationFactoryParameters.class);
        ServiceImplementationFactoryParameters fp = (ServiceImplementationFactoryParameters) fpc
                .getMock();

        SpringBeanParameter param = buildParameter("fred", beanFactory);

        Object fred = new Object();

        beanFactory.getBean("fred", List.class);
        control.setReturnValue(fred);

        fp.getFirstParameter();
        fpc.setReturnValue(param);

        fp.getServiceInterface();
        fpc.setReturnValue(List.class);

        replayControls();

        Object actual = lf.createCoreServiceImplementation(fp);
View Full Code Here

        MockControl translatorControl = newControl(Translator.class);
        Translator translator = (Translator) translatorControl.getMock();

        MockControl paramsControl = newControl(ServiceImplementationFactoryParameters.class);
        ServiceImplementationFactoryParameters params = (ServiceImplementationFactoryParameters) paramsControl
                .getMock();

        BuilderPropertyFacet facet = new BuilderPropertyFacet();

        facet.setTranslator("foo");
        facet.setValue("bar");

        params.getInvokingModule();
        paramsControl.setDefaultReturnValue(module);

        module.getTranslator("foo");
        moduleControl.setDefaultReturnValue(translator);
View Full Code Here

        MockControl translatorControl = newControl(Translator.class);
        Translator translator = (Translator) translatorControl.getMock();

        MockControl paramsControl = newControl(ServiceImplementationFactoryParameters.class);
        ServiceImplementationFactoryParameters params = (ServiceImplementationFactoryParameters) paramsControl
                .getMock();

        BuilderPropertyFacet facet = new BuilderPropertyFacet();

        facet.setTranslator("foo");
        facet.setValue("bar");

        params.getInvokingModule();
        paramsControl.setDefaultReturnValue(module);

        module.getTranslator("foo");
        moduleControl.setDefaultReturnValue(translator);
View Full Code Here

        IApplicationSpecification spec = (IApplicationSpecification) specControl.getMock();

        Runnable r = (Runnable) newMock(Runnable.class);

        MockControl fpc = newControl(ServiceImplementationFactoryParameters.class);
        ServiceImplementationFactoryParameters fp = (ServiceImplementationFactoryParameters) fpc
                .getMock();

        // Training

        fp.getParameters();
        fpc.setReturnValue(createParameters("foo.bar"));

        fp.getServiceInterface();
        fpc.setReturnValue(Runnable.class);

        spec.checkExtension("foo.bar");
        specControl.setReturnValue(true);
View Full Code Here

        DefaultImplementationBuilder dib = (DefaultImplementationBuilder) dibControl.getMock();

        Runnable r = (Runnable) newMock(Runnable.class);

        MockControl fpc = newControl(ServiceImplementationFactoryParameters.class);
        ServiceImplementationFactoryParameters fp = (ServiceImplementationFactoryParameters) fpc
                .getMock();

        // Training

        fp.getParameters();
        fpc.setReturnValue(createParameters("foo.bar"));

        fp.getServiceInterface();
        fpc.setReturnValue(Runnable.class);

        spec.checkExtension("foo.bar");
        specControl.setReturnValue(false);
View Full Code Here

        IApplicationSpecification spec = (IApplicationSpecification) specControl.getMock();

        Runnable r = (Runnable) newMock(Runnable.class);

        MockControl fpc = newControl(ServiceImplementationFactoryParameters.class);
        ServiceImplementationFactoryParameters fp = (ServiceImplementationFactoryParameters) fpc
                .getMock();

        // Training

        fp.getParameters();
        fpc.setReturnValue(createParameters("foo.bar", r));

        fp.getServiceInterface();
        fpc.setReturnValue(Runnable.class);

        spec.checkExtension("foo.bar");
        specControl.setReturnValue(false);
View Full Code Here

        p.setLocation(l);
        p.setExtensionName("gnip.gnop");

        MockControl fpc = newControl(ServiceImplementationFactoryParameters.class);
        ServiceImplementationFactoryParameters fp = (ServiceImplementationFactoryParameters) fpc
                .getMock();

        fp.getParameters();
        fpc.setReturnValue(Collections.singletonList(p));

        fp.getServiceInterface();
        fpc.setReturnValue(null);

        ExtensionLookupFactory f = new ExtensionLookupFactory();

        replayControls();
View Full Code Here

        IApplicationSpecification spec = (IApplicationSpecification) specControl.getMock();

        Runnable r = (Runnable) newMock(Runnable.class);

        MockControl fpc = newControl(ServiceImplementationFactoryParameters.class);
        ServiceImplementationFactoryParameters fp = (ServiceImplementationFactoryParameters) fpc
                .getMock();

        // Training

        fp.getParameters();
        fpc.setReturnValue(createParameters("foo.bar"));

        fp.getServiceInterface();
        fpc.setReturnValue(Runnable.class);

        spec.checkExtension("foo.bar");
        specControl.setReturnValue(true);
View Full Code Here

TOP

Related Classes of org.apache.hivemind.ServiceImplementationFactoryParameters

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.