Package org.rhq.core.clientapi.descriptor.plugin

Examples of org.rhq.core.clientapi.descriptor.plugin.PluginDescriptor


        );
    }

    @Test
    public void pluginAmpsVersionShouldBeSetToDescriptorAmpsVersion() throws Exception {
        PluginDescriptor pluginDescriptor = new PluginDescriptor();
        pluginDescriptor.setAmpsVersion("2.1");

        PluginTransformer transformer = new PluginTransformer();

        Plugin plugin = transformer.toPlugin(pluginDescriptor, getTestPluginURL());

        assertEquals(
            plugin.getAmpsVersion(),
            pluginDescriptor.getAmpsVersion(),
            "The plugin.ampsVersion property should be set to the plugin descriptor ampsVersion."
        );
    }
View Full Code Here


        );
    }

    @Test
    public void pluginAmpsVersionShouldBeSetToDefaultWhenDescriptorAmpsVersionIsNull() throws Exception {
        PluginDescriptor pluginDescriptor = new PluginDescriptor();

        PluginTransformer transformer = new PluginTransformer();

        Plugin plugin = transformer.toPlugin(pluginDescriptor, getTestPluginURL());
View Full Code Here

        );
    }

    @Test
    public void pluginDescriptionShouldBeSetToDescriptorDescription() throws Exception {
        PluginDescriptor pluginDescriptor = new PluginDescriptor();
        pluginDescriptor.setDescription("description");

        PluginTransformer transformer = new PluginTransformer();

        Plugin plugin = transformer.toPlugin(pluginDescriptor, getTestPluginURL());

        assertEquals(
            plugin.getDescription(),
            pluginDescriptor.getDescription(),
            "The plugin.description property should be set to the plugin descriptor description."
        );
    }
View Full Code Here

        );
    }

    @Test
    public void pluginEnabledFlagShouldBeSetToTrue() throws Exception {
        PluginDescriptor pluginDescriptor = new PluginDescriptor();

        PluginTransformer transformer = new PluginTransformer();

        Plugin plugin = transformer.toPlugin(pluginDescriptor, getTestPluginURL());
View Full Code Here

    @Test
    public void pluginPathShouldBeSetToPathOfPluginURL() throws Exception {
        File jarFile = createPluginJARFile();

        PluginDescriptor pluginDescriptor = new PluginDescriptor();
        URL pluginURL = toURL(jarFile);

        PluginTransformer transformer = new PluginTransformer();

        Plugin plugin = transformer.toPlugin(pluginDescriptor, pluginURL);
View Full Code Here

    @Test
    public void pluginMtimeShouldBeSetToLastModificationTimeOfPluginJarFile() throws Exception {
        File jarFile = createPluginJARFile();

        PluginDescriptor pluginDescriptor = new PluginDescriptor();
        URL pluginURL = toURL(jarFile);

        PluginTransformer transformer = new PluginTransformer();

        Plugin plugin = transformer.toPlugin(pluginDescriptor, pluginURL);
View Full Code Here

    @Test
    public void pluginHelpShouldBeSetToDescriptorHelp() throws Exception {
        Help help = new Help();
        help.getContent().add("help");

        PluginDescriptor pluginDescriptor = new PluginDescriptor();
        pluginDescriptor.setHelp(help);

        PluginTransformer transformer = new PluginTransformer();

        Plugin plugin = transformer.toPlugin(pluginDescriptor, getTestPluginURL());

        assertEquals(
            plugin.getHelp(),
            pluginDescriptor.getHelp().getContent().get(0),
            "The plugin.help property should be set to the plugin descriptor help."
        );
    }
View Full Code Here

    @Test
    public void pluginMd5ShouldBeSetToMd5OfPluginJarFile() throws Exception {
        File jarFile = createPluginJARFile();

        PluginDescriptor pluginDescriptor = new PluginDescriptor();
        URL pluginURL = toURL(jarFile);

        PluginTransformer transformer = new PluginTransformer();

        Plugin plugin = transformer.toPlugin(pluginDescriptor, pluginURL);
View Full Code Here

        );
    }

    @Test
    public void pluginVersionShouldBeSetToPluginDescriptorVersion() throws Exception {
        PluginDescriptor pluginDescriptor = new PluginDescriptor();
        pluginDescriptor.setVersion("2.1");

        PluginTransformer transformer = new PluginTransformer();

        Plugin plugin = transformer.toPlugin(pluginDescriptor, getTestPluginURL());

        assertEquals(
            plugin.getVersion(),
            pluginDescriptor.getVersion(),
            "The plugin.version property should be set to the plugin descriptor version."
        );
    }
View Full Code Here

        File jarFile = createPluginJARFile();
        URL pluginURL = toURL(jarFile);

        PluginTransformer transformer = new PluginTransformer();

        Plugin plugin = transformer.toPlugin(new PluginDescriptor(), pluginURL);

        assertEquals(
            plugin.getVersion(),
            getVersionFromPluginJarManifest(jarFile),
            "The pliugin.version property should be set to the " + Attributes.Name.IMPLEMENTATION_VERSION +
View Full Code Here

TOP

Related Classes of org.rhq.core.clientapi.descriptor.plugin.PluginDescriptor

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.