Package org.apache.tools.ant.types.resources

Examples of org.apache.tools.ant.types.resources.PropertyResource


        return new Iterator() {
            public boolean hasNext() {
                return e.hasMoreElements();
            }
            public Object next() {
                return new PropertyResource(getProject(), (String) e.nextElement());
            }
            public void remove() {
                throw new UnsupportedOperationException();
            }
        };
View Full Code Here


        return new Iterator<Resource>() {
            public boolean hasNext() {
                return iter.hasNext();
            }
            public Resource next() {
                PropertyResource p = new PropertyResource(getProject(), iter.next());
                return m == null ? (Resource) p : new MappedResource(p, m);
            }
            public void remove() {
                throw new UnsupportedOperationException();
            }
View Full Code Here

        assertEquals("bar", r.getValue());
    }

    @Test
    public void testpropertyoutput1() {
        PropertyResource r = new PropertyResource(project, "bar");
        testoutputbe(r);
        assertEquals("foo", project.getProperty("bar"));
    }
View Full Code Here

    }

    @Test
    public void testpropertyoutput2() throws IOException {
        project.setNewProperty("bar", "bar");
        PropertyResource r = new PropertyResource(project, "bar");
        try {
            testoutput(r);
            fail("should have caught ImmutableResourceException");
        } catch (ImmutableResourceException e) {
            //TODO assert exception message
View Full Code Here

        return new Iterator() {
            public boolean hasNext() {
                return e.hasMoreElements();
            }
            public Object next() {
                return new PropertyResource(getProject(), (String) e.nextElement());
            }
            public void remove() {
                throw new UnsupportedOperationException();
            }
        };
View Full Code Here

        return new Iterator() {
            public boolean hasNext() {
                return iter.hasNext();
            }
            public Object next() {
                PropertyResource p = new PropertyResource(getProject(), (String) iter.next());
                return m == null ? (Resource) p : new MappedResource(p, m);
            }
            public void remove() {
                throw new UnsupportedOperationException();
            }
View Full Code Here

        }
        assertEquals("bar", r.getValue());
    }

    public void testpropertyoutput1() {
        PropertyResource r = new PropertyResource(getProject(), "bar");
        testoutputbe(r);
        assertPropertyEquals("bar", "foo");
    }
View Full Code Here

        assertPropertyEquals("bar", "foo");
    }

    public void testpropertyoutput2() {
        getProject().setNewProperty("bar", "bar");
        PropertyResource r = new PropertyResource(getProject(), "bar");
        try {
            testoutput(r);
            fail("should have caught ImmutableResourceException");
        } catch (ImmutableResourceException e) {
        } catch (IOException e) {
View Full Code Here

TOP

Related Classes of org.apache.tools.ant.types.resources.PropertyResource

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.