Package org.switchyard.common.version

Examples of org.switchyard.common.version.Version


    }

    @Test
    public void testEquals() {
        VersionFactory factory = VersionFactory.instance();
        final Version expected = factory.getVersion(SWITCHYARD_COMMON);
        Version actual = factory.getVersion(Projects.create("org.switchyard", "switchyard-common"));
        assertEquals(expected, actual);
        actual = factory.getVersion(SWITCHYARD, new Query(PROJECT_ARTIFACT_ID, "switchyard-common"));
        assertEquals(expected, actual);
        actual = factory.getVersion(new Query(SPECIFICATION_TITLE, "SwitchYard: Common"));
        assertEquals(expected, actual);
View Full Code Here


    }

    @Test
    public void testCompare() {
        VersionFactory factory = VersionFactory.instance();
        Version api = factory.getVersion(SWITCHYARD_API);
        Version common = factory.getVersion(SWITCHYARD_COMMON);
        Set<Version> set = new TreeSet<Version>();
        // add out of order
        set.add(common);
        set.add(api);
        Iterator<Version> iter = set.iterator();
View Full Code Here

            try {
                URLConnection conn = url.openConnection();
                // avoid file-locking on Windows
                conn.setUseCaches(false);
                is = conn.getInputStream();
                Version version = new ManifestVersion(new Manifest(is));
                boolean matches = true;
                queryLoop: for (Query query : queries) {
                    if (!query.matches(version)) {
                        matches = false;
                        break queryLoop;
View Full Code Here

TOP

Related Classes of org.switchyard.common.version.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.