Package hivemind.test.services.impl

Examples of hivemind.test.services.impl.StringHolderImpl


                {
                    System.out.println(entry);
                }
                String one = (String) configuration("SingleElement", String.class);
                System.out.println(one);
                StringHolderImpl holder = (StringHolderImpl) configuration("StringHolder", StringHolderImpl.class);
                System.out.println(holder.getValue());
               
                StringHolderImpl holderService = (StringHolderImpl) service("StringHolder", StringHolderImpl.class);
                System.out.println(holderService.getValue());
            }
        };
    }
View Full Code Here


    }
   
    @Configuration(id = "StringHolder")
    public StringHolderImpl getStringHolder()
    {
        StringHolderImpl result = new StringHolderImpl();
        result.setValue("test");
        return result;
    }
View Full Code Here

    }
   
    @Service(id = "StringHolder")
    public StringHolderImpl getStringHolderService()
    {
        StringHolderImpl result = new StringHolderImpl();
        result.setValue("test");
        return result;
    }
View Full Code Here

public class Submodule1 extends AbstractAnnotatedModule
{
    @Service(id = "StringHolder")
    public StringHolderImpl getStringHolderService()
    {
        StringHolderImpl result = new StringHolderImpl();
        result.setValue("test");
        return result;
    }
View Full Code Here

    }

    @Service(id = "StringHolder")
    public StringHolder getStringHolder()
    {
        return new StringHolderImpl();
    }
View Full Code Here

        assertEquals(2, dest.size());

        Set keys = new TreeSet();
        for (Iterator iter = dest.values().iterator(); iter.hasNext();)
        {
            StringHolderImpl element = (StringHolderImpl) iter.next();
            keys.add(element.getValue());
        }

        assertTrue(keys.contains(flintstoneKeyModule1));
        assertTrue(keys.contains(flintstoneKeyModule2));
View Full Code Here

        mockProcessor.getSymbolExpander();
        control.setReturnValue(symbolExpander);

        mockProcessor.peek();

        StringHolderImpl target = new StringHolderImpl();
        control.setReturnValue(target);

        mockProcessor.getAttributeTranslator("fred");
        control.setReturnValue(new NullTranslator());

        mockProcessor.getContributingModule();
        control.setReturnValue(mockModule);

        symbolExpander.expandSymbols("${flintstone}", element.getLocation());
        symbolExpanderControl.setReturnValue("FLINTSTONE");

        replayControls();

        rule.begin(mockProcessor, element);
        rule.end(mockProcessor, element);

        verifyControls();

        assertEquals("FLINTSTONE", target.getValue());
    }
View Full Code Here

        registry.containsService(StringHolder.class, null);
        registryControl.setReturnValue(true);

        registry.getService(StringHolder.class, null);
        registryControl.setReturnValue(new StringHolderImpl());

        replayControls();
       
        Autowiring autowiring = new AutowiringImpl(registry, strategyContributions, new DefaultErrorHandler());
        autowiring.autowireProperties(target, new String[] {"stringHolder"});
View Full Code Here

        AutowiringStrategyContribution contrib1 = new AutowiringStrategyContribution(strategy1,
                "strategy1", null, null);
        strategyContributions.add(contrib1);

        ServiceAutowireTarget target = new ServiceAutowireTarget();
        target.setStringHolder(new StringHolderImpl());
       
        MockControl registryControl = newControl(RegistryInfrastructure.class);
        RegistryInfrastructure registry = (RegistryInfrastructure) registryControl.getMock();
       
        replayControls();
View Full Code Here

        RegistryInfrastructure r = (RegistryInfrastructure) rc.getMock();

        ModuleImpl m = new ModuleImpl();
        m.setRegistry(r);

        StringHolder h = new StringHolderImpl();

        r.getService(StringHolder.class, m);
        rc.setReturnValue(h);

        replayControls();
View Full Code Here

TOP

Related Classes of hivemind.test.services.impl.StringHolderImpl

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.