Examples of RegistryInfrastructure


Examples of org.apache.hivemind.internal.RegistryInfrastructure

        verifyControls();
    }

    public void testConfigurationTranslator() throws Exception
    {
        RegistryInfrastructure r =
            (RegistryInfrastructure) buildFrameworkRegistry("ConfigurationTranslator.xml");

        DatumHolder h =
            (DatumHolder) r.getService(
                "hivemind.test.rules.ExtensionPointTranslator",
                DatumHolder.class);
        List l1 = h.getDatums();
        List l2 = r.getConfiguration("hivemind.test.rules.EP");

        assertSame(l2, l1);
    }
View Full Code Here

Examples of org.apache.hivemind.internal.RegistryInfrastructure

        assertLoggedMessagePattern("Error at .*?: Element xatum is not allowed here\\.");
    }

    public void testCustomRule() throws Exception
    {
        RegistryInfrastructure r =
            (RegistryInfrastructure) buildFrameworkRegistry("CustomRule.xml");

        List l = r.getConfiguration("hivemind.test.config.CustomRule");
        Module m = r.getConfigurationPoint("hivemind.test.config.CustomRule").getModule();

        Datum d = (Datum) l.get(0);

        // Put this check second, just to get some code coverage
        // on ElementsInnerProxyList
View Full Code Here

Examples of org.apache.hivemind.internal.RegistryInfrastructure

{

  public void testGetServiceByInterface()
  {
    MockControl rc = newControl(RegistryInfrastructure.class);
    RegistryInfrastructure r = (RegistryInfrastructure) rc.getMock();
   
    ModuleImpl m = new ModuleImpl();
    m.setRegistry(r);
   
    StringHolder h = new StringHolderImpl();
   
    r.getService(StringHolder.class);
    rc.setReturnValue(h);
   
    replayControls();
   
    Object result = m.getService(StringHolder.class);
View Full Code Here

Examples of org.apache.hivemind.internal.RegistryInfrastructure

        ClassResolver resolver = new DefaultClassResolver(loader);

        RegistryBuilder b = new RegistryBuilder();
        b.processModules(resolver);

        RegistryInfrastructure r =
            (RegistryInfrastructure) b.constructRegistry(Locale.getDefault());

        List l = r.getConfiguration("hivemind.test.config.Symbols");
        assertEquals(1, l.size());

        Datum d = (Datum) l.get(0);

        assertEquals("wife", d.getKey());
View Full Code Here

Examples of org.apache.hivemind.internal.RegistryInfrastructure

                LogFactory.getLog(TestRegistryInfrastructureConstructor.class), null);

        ric.addModuleDescriptor(fooBar);
        ric.addModuleDescriptor(zipZoop);

        RegistryInfrastructure registry = ric.constructRegistryInfrastructure(Locale.getDefault());

        ConfigurationPoint point = registry.getConfigurationPoint("zip.zoop.Zap", null);
        assertEquals(schema, point.getContributionsSchema());
    }
View Full Code Here

Examples of org.apache.hivemind.internal.RegistryInfrastructure

        RegistryInfrastructureConstructor ric = new RegistryInfrastructureConstructor(eh, log, null);

        ric.addModuleDescriptor(md);

        RegistryInfrastructure ri = ric.constructRegistryInfrastructure(Locale.getDefault());

        List l = ri.getConfiguration("zip.zoop.Fred", null);

        Element e = (Element) l.get(0);

        assertEquals("foo", e.getElementName());
View Full Code Here

Examples of org.apache.hivemind.internal.RegistryInfrastructure

        RegistryInfrastructureConstructor ric = new RegistryInfrastructureConstructor(eh, log, null);

        ric.addModuleDescriptor(md);

        RegistryInfrastructure ri = ric.constructRegistryInfrastructure(Locale.getDefault());

        List l = ri.getConfiguration("zip.zoop.Fred", null);

        assertTrue(l.isEmpty());

        verifyControls();
    }
View Full Code Here

Examples of org.apache.hivemind.internal.RegistryInfrastructure

        RegistryInfrastructureConstructor ric = new RegistryInfrastructureConstructor(eh, log, null);

        ric.addModuleDescriptor(md);

        RegistryInfrastructure ri = ric.constructRegistryInfrastructure(Locale.getDefault());

        List l = ri.getConfiguration("zip.zoop.Fred", null);

        assertTrue(l.isEmpty());

        verifyControls();
    }
View Full Code Here

Examples of org.apache.hivemind.internal.RegistryInfrastructure

{

    public void testGetServiceByInterface()
    {
        MockControl rc = newControl(RegistryInfrastructure.class);
        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();

        Object result = m.getService(StringHolder.class);
View Full Code Here

Examples of org.apache.hivemind.internal.RegistryInfrastructure

*/
public class TestRegistryInfrastructure extends HiveMindTestCase
{
    public void testGetMissingExtensionPoint()
    {
        RegistryInfrastructure r = new RegistryInfrastructureImpl(null, null);

        try
        {
            r.getServicePoint("foo", null);
            unreachable();
        }
        catch (ApplicationRuntimeException ex)
        {
            assertEquals(ImplMessages.noSuchServicePoint("foo"), ex.getMessage());
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.