Package org.apache.hivemind.parse

Examples of org.apache.hivemind.parse.ModuleDescriptor


        assertEquals("myParameter", em.getElementName());
    }

    public void testDependency() throws Exception
    {
        ModuleDescriptor md = parse("GenericModule.xml");
        List l = md.getDependencies();
        assertEquals(1, l.size());
        DependencyDescriptor dd = (DependencyDescriptor) l.get(0);

        assertEquals("my.module", dd.getModuleId());
        assertEquals("1.0.0", dd.getVersion());
View Full Code Here


                + "separated by periods\\.");
    }

    public void testSchemaDescription() throws Exception
    {
        ModuleDescriptor md = parse("SchemaDescription.xml");

        List points = md.getConfigurationPoints();

        ConfigurationPointDescriptor cpd = (ConfigurationPointDescriptor) points.get(0);

        assertEquals("PointWithDescription", cpd.getId());
    }
View Full Code Here

        assertEquals("PointWithDescription", cpd.getId());
    }

    public void testEmbeddedConfigSchema() throws Exception
    {
        ModuleDescriptor md = parse("EmbeddedConfigSchema.xml");

        List points = md.getConfigurationPoints();
        ConfigurationPointDescriptor cpd = (ConfigurationPointDescriptor) points.get(0);
        Schema s = cpd.getContributionsSchema();

        List l = s.getElementModel();
View Full Code Here

        assertEquals("foo", em.getElementName());
    }

    public void testEmbeddedParametersSchema() throws Exception
    {
        ModuleDescriptor md = parse("EmbeddedParametersSchema.xml");

        List points = md.getServicePoints();
        ServicePointDescriptor spd = (ServicePointDescriptor) points.get(0);
        Schema s = spd.getParametersSchema();

        List l = s.getElementModel();
View Full Code Here

        assertEquals("foo", em.getElementName());
    }

    public void testSetPropertyRule() throws Exception
    {
        ModuleDescriptor md = parse("SetPropertyRule.xml");

        List points = md.getConfigurationPoints();
        ConfigurationPointDescriptor cpd = (ConfigurationPointDescriptor) points.get(0);
        Schema s = cpd.getContributionsSchema();
        List l = s.getElementModel();

        ElementModel em = (ElementModel) l.get(0);
View Full Code Here

        assertEquals("bar", rule.getValue());
    }

    public void testPushAttributeRule() throws Exception
    {
        ModuleDescriptor md = parse("PushAttributeRule.xml");

        List points = md.getConfigurationPoints();
        ConfigurationPointDescriptor cpd = (ConfigurationPointDescriptor) points.get(0);
        Schema s = cpd.getContributionsSchema();
        List l = s.getElementModel();

        ElementModel em = (ElementModel) l.get(0);
View Full Code Here

    }

    /** @since 1.1 */
    public void testPushContentRule() throws Exception
    {
        ModuleDescriptor md = parse("PushContentRule.xml");

        List points = md.getConfigurationPoints();
        ConfigurationPointDescriptor cpd = (ConfigurationPointDescriptor) points.get(0);
        Schema s = cpd.getContributionsSchema();
        List l = s.getElementModel();

        ElementModel em = (ElementModel) l.get(0);
View Full Code Here

    }

    /** @since 1.1 */
    public void testPrivateServicePoint() throws Exception
    {
        ModuleDescriptor md = parse("PrivateServicePoint.xml");

        List points = md.getServicePoints();
        ServicePointDescriptor spd = (ServicePointDescriptor) points.get(0);

        assertEquals(Visibility.PRIVATE, spd.getVisibility());
    }
View Full Code Here

    }

    /** @since 1.1 */
    public void testPrivateConfigurationPoint() throws Exception
    {
        ModuleDescriptor md = parse("PrivateConfigurationPoint.xml");

        List points = md.getConfigurationPoints();
        ConfigurationPointDescriptor cpd = (ConfigurationPointDescriptor) points.get(0);

        assertEquals(Visibility.PRIVATE, cpd.getVisibility());
    }
View Full Code Here

        Resource location = getResource("PrivateSchema.xml");
        DefaultErrorHandler eh = new DefaultErrorHandler();

        XmlResourceProcessor p = new XmlResourceProcessor(_resolver, eh);

        ModuleDescriptor md = p.processResource(location);

        SchemaImpl s = (SchemaImpl) md.getSchema("PrivateSchema");

        assertEquals(Visibility.PRIVATE, s.getVisibility());
    }
View Full Code Here

TOP

Related Classes of org.apache.hivemind.parse.ModuleDescriptor

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.