Examples of ModuleDescriptor


Examples of org.apache.hivemind.parse.ModuleDescriptor

        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);

        String schemaId = cpd.getContributionsSchemaId();

        assertEquals("Fool", schemaId);

        Schema schema = md.getSchema(schemaId);

        assertNotNull(schema.getLocation());

        l = schema.getElementModel();
        assertEquals(2, l.size());
View Full Code Here

Examples of org.apache.hivemind.parse.ModuleDescriptor

        assertLoggedMessage("Schema Bad is invalid: Key attribute 'bad' of element 'foo' never declared.");
    }

    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 = md.getSchema(cpd.getContributionsSchemaId());

        l = schema.getElementModel();

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

Examples of org.apache.hivemind.parse.ModuleDescriptor

        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);

        String schemaId = spd.getParametersSchemaId();

        assertEquals("Parameters", schemaId);

        ElementModel em = (ElementModel) md.getSchema(schemaId).getElementModel().get(0);

        assertEquals("myParameter", em.getElementName());
    }
View Full Code Here

Examples of org.apache.hivemind.parse.ModuleDescriptor

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

        ModuleDescriptor md = parse("DuplicateSchemas.xml");

        assertLoggedMessagePattern("Multiple contributions schemas specified for configuration MyConfiguration. Using locally defined schema \\(at ");

        ConfigurationPointDescriptor cpd = (ConfigurationPointDescriptor) md
                .getConfigurationPoints().get(0);
        Schema nestedSchema = cpd.getContributionsSchema();

        assertNotNull(nestedSchema);
View Full Code Here

Examples of org.apache.hivemind.parse.ModuleDescriptor

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

        ModuleDescriptor md = parse("DuplicateSchemas.xml");

        assertLoggedMessagePattern("Multiple parameters schemas specified for service MyServiceFactory. Using locally defined schema \\(at ");

        ServicePointDescriptor spd = (ServicePointDescriptor) md.getServicePoints().get(0);
        Schema nestedSchema = spd.getParametersSchema();

        assertNotNull(nestedSchema);

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

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

Examples of org.apache.hivemind.parse.ModuleDescriptor

        new ConfigurationPointDescriptor().toString();
        new ContributionDescriptor().toString();
        new ImplementationDescriptor().toString();
        new CreateInstanceDescriptor().toString();
        new InvokeFactoryDescriptor().toString();
        new ModuleDescriptor().toString();
        new ServicePointDescriptor().toString();
        new InterceptorDescriptor().toString();
        new ModuleImpl().toString();
        new RegistryImpl(null, Locale.ENGLISH).toString();
        new ContributionImpl().toString();
View Full Code Here

Examples of org.apache.hivemind.parse.ModuleDescriptor

            "Unexpected attribute(s) " + map + " in element " + e.getElementName() + ".");
    }

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

        assertEquals("hivemind.test.parse", md.getModuleId());
        assertEquals("1.0.0", md.getVersion());
    }
View Full Code Here

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

Examples of org.apache.hivemind.parse.ModuleDescriptor

        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
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.