Package java.util

Examples of java.util.SortedSet


            throw new IllegalStateException("Cannot delete "+dir.getAbsolutePath());
        }
    }

    public void testListAll() {
        SortedSet artifacts = repository.list();
        System.out.println("Matched artifacts: "+artifacts);

        assertTrue(artifacts.contains(new Artifact("org.foo", "test", "2.0.1", "properties")));
        assertFalse(artifacts.contains(new Artifact("Unknown", "artifact", "2.0.1", "properties")));
        assertEquals(4, artifacts.size());
    }
View Full Code Here


        assertFalse(artifacts.contains(new Artifact("Unknown", "artifact", "2.0.1", "properties")));
        assertEquals(4, artifacts.size());
    }

    public void testListSpecifyArtifact() {
        SortedSet artifacts = repository.list(new Artifact(null, "test", (Version)null, null));

        assertTrue(artifacts.contains(new Artifact("org.bar", "test", "1.5", "properties")));
        assertTrue(artifacts.contains(new Artifact("org.bar", "test", "1.3", "properties")));
        assertTrue(artifacts.contains(new Artifact("org.foo", "test", "2.0.1", "properties")));
        assertEquals(3, artifacts.size());
    }
View Full Code Here

        assertTrue(artifacts.contains(new Artifact("org.foo", "test", "2.0.1", "properties")));
        assertEquals(3, artifacts.size());
    }

    public void testListSpecifyArtifactGroup() {
        SortedSet artifacts = repository.list(new Artifact("org.bar", "test", (Version)null, null));

        assertTrue(artifacts.contains(new Artifact("org.bar", "test", "1.5", "properties")));
        assertTrue(artifacts.contains(new Artifact("org.bar", "test", "1.3", "properties")));
        assertEquals(2, artifacts.size());
    }
View Full Code Here

        assertTrue(artifacts.contains(new Artifact("org.bar", "test", "1.3", "properties")));
        assertEquals(2, artifacts.size());
    }

    public void testListSpecifyArtifactType() {
        SortedSet artifacts = repository.list(new Artifact(null, "test", (Version)null, "properties"));

        assertTrue(artifacts.contains(new Artifact("org.bar", "test", "1.5", "properties")));
        assertTrue(artifacts.contains(new Artifact("org.bar", "test", "1.3", "properties")));
        assertTrue(artifacts.contains(new Artifact("org.foo", "test", "2.0.1", "properties")));
        assertEquals(3, artifacts.size());
    }
View Full Code Here

        assertTrue(artifacts.contains(new Artifact("org.foo", "test", "2.0.1", "properties")));
        assertEquals(3, artifacts.size());
    }

    public void testListSpecifyArtifactVersion() {
        SortedSet artifacts = repository.list(new Artifact(null, "test", "1.5", null));

        assertTrue(artifacts.contains(new Artifact("org.bar", "test", "1.5", "properties")));
        assertEquals(1, artifacts.size());
    }
View Full Code Here

        assertTrue(artifacts.contains(new Artifact("org.bar", "test", "1.5", "properties")));
        assertEquals(1, artifacts.size());
    }

    public void testListSpecifyArtifactGroupType() {
        SortedSet artifacts = repository.list(new Artifact("org.bar", "test", (Version)null, "properties"));

        assertTrue(artifacts.contains(new Artifact("org.bar", "test", "1.5", "properties")));
        assertTrue(artifacts.contains(new Artifact("org.bar", "test", "1.3", "properties")));
        assertEquals(2, artifacts.size());
    }
View Full Code Here

        assertTrue(artifacts.contains(new Artifact("org.bar", "test", "1.3", "properties")));
        assertEquals(2, artifacts.size());
    }

    public void testListSpecifyArtifactGroupVersion() {
        SortedSet artifacts = repository.list(new Artifact("org.bar", "test", "1.5", null));

        assertTrue(artifacts.contains(new Artifact("org.bar", "test", "1.5", "properties")));
        assertEquals(1, artifacts.size());
    }
View Full Code Here

        assertTrue(artifacts.contains(new Artifact("org.bar", "test", "1.5", "properties")));
        assertEquals(1, artifacts.size());
    }

    public void testListSpecifyArtifactVersionType() {
        SortedSet artifacts = repository.list(new Artifact(null, "test", "1.5", "properties"));

        assertTrue(artifacts.contains(new Artifact("org.bar", "test", "1.5", "properties")));
        assertEquals(1, artifacts.size());
    }
View Full Code Here

        assertTrue(artifacts.contains(new Artifact("org.bar", "test", "1.5", "properties")));
        assertEquals(1, artifacts.size());
    }

    public void testListSpecifyAll() {
        SortedSet artifacts = repository.list(new Artifact("org.bar", "test", "1.5", "properties"));

        assertTrue(artifacts.contains(new Artifact("org.bar", "test", "1.5", "properties")));
        assertEquals(1, artifacts.size());
    }
View Full Code Here

            }
        }
    }

    public List listConfigurations() {
        SortedSet artifacts = repository.list();

        List configs;
        synchronized (this) {
            configs = new ArrayList();
            for (Iterator i = artifacts.iterator(); i.hasNext();) {
                Artifact configId = (Artifact) i.next();
                File dir = repository.getLocation(configId);
                File meta = new File(dir, "META-INF");
                if(!meta.isDirectory() || !meta.canRead()) {
                    continue;
View Full Code Here

TOP

Related Classes of java.util.SortedSet

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.