Package org.jnode.util

Examples of org.jnode.util.Version


                    System.getProperty("os.version") : plugin.getPluginVersion();
            try {
                PluginManager mgr = InitialNaming.lookup(PluginManager.NAME);
                PluginRegistry reg = mgr.getRegistry();
                if (reg.getPluginDescriptor(id) == null) {
                    reg.loadPlugin(mgr.getLoaderManager(), new PluginReference(id, new Version(ver)), true);
                }
            } catch (Exception ex) {
                System.out.println(ex.getMessage());
                throw new TestRunnerException(
                        "Cannot load plugin '" + plugin.getPluginId() + "/" + ver + "'", ex);
View Full Code Here


        final String pluginIdentifier = getAttribute(e, "plugin", true);
        String version = getAttribute(e, "version", false);
        if (version == null) {
            version = plugin.getVersion().toString();
        }
        reference = new PluginReference(pluginIdentifier, new Version(version));
    }
View Full Code Here

import org.junit.Test;

public class VersionTest {
    @Test
    public void testToString1() throws Exception {
        Version v = new Version(1, 2);
        assertEquals("1.2", v.toString());
    }
View Full Code Here

        assertEquals("1.2", v.toString());
    }

    @Test
    public void testToString1b() throws Exception {
        Version v = new Version(1, 2, "dev");
        assertEquals("1.2-dev", v.toString());
    }
View Full Code Here

        assertEquals("1.2-dev", v.toString());
    }

    @Test
    public void testToString2() throws Exception {
        Version v = new Version(1, 2, 3);
        assertEquals("1.2.3", v.toString());
    }
View Full Code Here

        assertEquals("1.2.3", v.toString());
    }

    @Test
    public void testToString2b() throws Exception {
        Version v = new Version(1, 2, 3, "foo");
        assertEquals("1.2.3-foo", v.toString());
    }
View Full Code Here

        assertEquals("1.2.3-foo", v.toString());
    }

    @Test
    public void testToString3() throws Exception {
        Version v = new Version(1, 2, 3, 4);
        assertEquals("1.2.3.4", v.toString());
    }
View Full Code Here

     */
    public FragmentDescriptorModel(PluginJar jarFile, XMLElement e)
        throws PluginException {
        super(jarFile, e);
        this.pluginId = getAttribute(e, "plugin-id", true);
        this.pluginVersion = new Version(getAttribute(e, "plugin-version", true));
    }
View Full Code Here

     * @see org.jnode.plugin.model.PluginDescriptorModel#initializeRequiresList(java.util.List)
     */
    protected void initializeRequiresList(List<PluginPrerequisiteModel> list,
                                          XMLElement e) throws PluginException {
        final String pluginId = getAttribute(e, "plugin-id", true);
        final Version pluginVersion = new Version(getAttribute(e, "plugin-version", true));
        list.add(new PluginPrerequisiteModel(this, pluginId, pluginVersion));
    }
View Full Code Here

        assertEquals("1.2.3.4", v.toString());
    }

    @Test
    public void testToString3b() throws Exception {
        Version v = new Version(1, 2, 3, 4, "foo");
        assertEquals("1.2.3.4-foo", v.toString());
    }
View Full Code Here

TOP

Related Classes of org.jnode.util.Version

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.