Package org.apache.hivemind

Examples of org.apache.hivemind.Registry


        assertEquals("value2", d.getValue());
    }

    public void testNullElement() throws Exception
    {
        Registry r = buildFrameworkRegistry("Null.xml");

        List l = (List) r.getConfiguration("hivemind.test.config.Null");

        assertEquals(1, l.size());

        assertNull(l.get(0));
    }
View Full Code Here


        assertNull(l.get(0));
    }

    public void testAttributeDefaults() throws Exception
    {
        Registry r = buildFrameworkRegistry("AttributeDefaults.xml");

        List l = (List) r.getConfiguration("hivemind.test.config.AttributeDefaults");

        assertEquals(1, l.size());
        Datum d = (Datum) l.get(0);

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

        assertNull(d.getValue());
    }

    public void testNested() throws Exception
    {
        Registry r = buildFrameworkRegistry("Nested.xml");

        List l = (List) r.getConfiguration("hivemind.test.config.Nested");

        assertEquals(1, l.size());

        DatumHolder h = (DatumHolder) l.get(0);
View Full Code Here

        assertEquals("barney", d.getValue());
    }

    public void testStructured() throws Exception
    {
        Registry r = buildFrameworkRegistry("Structured.xml");

        List l = (List) r.getConfiguration("hivemind.test.config.Structured");

        assertEquals(2, l.size());

        Datum d = (Datum) l.get(0);
View Full Code Here

        assertEquals("value_2", d.getValue());
    }

    public void testSetParent() throws Exception
    {
        Registry r = buildFrameworkRegistry("SetParent.xml");

        List l = (List) r.getConfiguration("hivemind.test.config.SetParent");

        assertEquals(1, l.size());

        Parent p1 = (Parent) l.get(0);
View Full Code Here

    public void testBooleanTranslator() throws Exception
    {
        interceptLogging();

        Registry r = buildFrameworkRegistry("BooleanTranslator.xml");

        List l = (List) r.getConfiguration("hivemind.test.config.BooleanTranslator");

        // Trigger the proxy

        l.size();
View Full Code Here

    public void testIntTranslator() throws Exception
    {
        interceptLogging();

        Registry r = buildFrameworkRegistry("IntTranslator.xml");

        List l = (List) r.getConfiguration("hivemind.test.config.IntTranslator");

        // Convert the proxy into a real list.

        l.size();
View Full Code Here

    }

    public void testInstanceTranslator() throws Exception
    {
        Registry r = buildFrameworkRegistry("InstanceTranslator.xml");

        List l = (List) r.getConfiguration("hivemind.test.config.InstanceTranslator");

        assertEquals(1, l.size());

        FrobableHolder h = (FrobableHolder) l.get(0);
View Full Code Here

    public void testSymbols() throws Exception
    {
        interceptLogging();

        Registry r = buildFrameworkRegistry("Symbols.xml");

        List l = (List) r.getConfiguration("hivemind.test.config.Symbols");

        assertEquals(3, l.size());

        Datum d = (Datum) l.get(0);
View Full Code Here

        assertLoggedMessagePattern("No value available for symbol 'work'");
    }

    public void testNoSchema() throws Exception
    {
        Registry r = buildFrameworkRegistry("NoSchema.xml");

        List l = (List) r.getConfiguration("hivemind.test.config.NoSchema");

        assertEquals(2, l.size());

        Element e = (Element) l.get(0);
        assertEquals("datum", e.getElementName());
View Full Code Here

TOP

Related Classes of org.apache.hivemind.Registry

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.