Package org.apache.hivemind.parse

Examples of org.apache.hivemind.parse.ModuleDescriptor


        assertEquals("1.0.0", md.getVersion());
    }

    public void testConfigurationPointAttributes() throws Exception
    {
        ModuleDescriptor md = parse("GenericModule.xml");

        List l = md.getConfigurationPoints();
        assertEquals(1, l.size());

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

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


        assertEquals(Occurances.ONE_PLUS, cpd.getCount());
    }

    public void testContributionAttributes() throws Exception
    {
        ModuleDescriptor md = parse("GenericModule.xml");

        List l = md.getContributions();
        assertEquals(1, l.size());

        ContributionDescriptor cd = (ContributionDescriptor) l.get(0);

        assertEquals("MyExtensionPoint", cd.getConfigurationId());
View Full Code Here

        assertEquals("MyExtensionPoint", cd.getConfigurationId());
    }

    public void testContributionElements() throws Exception
    {
        ModuleDescriptor md = parse("GenericModule.xml");

        List l = md.getContributions();
        assertEquals(1, l.size());

        ContributionDescriptor cd = (ContributionDescriptor) l.get(0);

        l = cd.getElements();
View Full Code Here

        checkAttributes(e, new String[] { "gnip", "gnop" });
    }

    public void testServicePoint() throws Exception
    {
        ModuleDescriptor md = parse("GenericModule.xml");

        List l = md.getServicePoints();
        assertEquals(2, l.size());
        ServicePointDescriptor spd = (ServicePointDescriptor) l.get(0);

        assertEquals("MyService1", spd.getId());
        assertEquals("package.MyService", spd.getInterfaceClassName());
View Full Code Here

        assertEquals("MyInterceptor", id.getAfter());
    }

    public void testImplementation() throws Exception
    {
        ModuleDescriptor md = parse("GenericModule.xml");
        List l = md.getImplementations();
        assertEquals(1, l.size());

        ImplementationDescriptor id1 = (ImplementationDescriptor) l.get(0);

        assertEquals("othermodule.OtherService", id1.getServiceId());
View Full Code Here

        assertEquals("MyInterceptor", id2.getFactoryServiceId());
    }

    public void testConfigurationPointSchema() throws Exception
    {
        ModuleDescriptor md = parse("GenericModule.xml");

        List l = md.getConfigurationPoints();
        assertEquals(1, l.size());
        ConfigurationPointDescriptor cpd = (ConfigurationPointDescriptor) l.get(0);

        Schema schema = cpd.getContributionsSchema();
View Full Code Here

        assertEquals(1, em.getAttributeModels().size());
    }

    public void testRules() throws Exception
    {
        ModuleDescriptor md = parse("GenericModule.xml");
        List l = md.getConfigurationPoints();
        assertEquals(1, l.size());
        ConfigurationPointDescriptor cpd = (ConfigurationPointDescriptor) l.get(0);
        Schema schema = cpd.getContributionsSchema();

        l = schema.getElementModel();
View Full Code Here

        assertEquals("addElement", rule5.getMethodName());
    }

    public void testParametersSchema() throws Exception
    {
        ModuleDescriptor md = parse("GenericModule.xml");
        List l = md.getServicePoints();
        assertEquals(2, l.size());
        ServicePointDescriptor spd = (ServicePointDescriptor) l.get(1);
        Schema schema = spd.getParametersSchema();

        assertNotNull(schema);
View Full Code Here

                + "seperated 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

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.