Package org.apache.hivemind.ant

Examples of org.apache.hivemind.ant.ConstructRegistry


    public void testBasic() throws Exception
    {
        if (JDK1_3)
            return;

        ConstructRegistry cr = create();

        Path p = cr.createDescriptors();

        p.createPath().setLocation(
                new File(getFrameworkPath("src/test-data/TestConstructRegistry/master.xml")));
        p.createPath().setLocation(
                new File(getFrameworkPath("src/test-data/TestConstructRegistry/Symbols.xml")));

        File output = File.createTempFile("testBasic-", ".xml");

        // Delete the file, to force the task to re-create it.

        output.delete();

        output.deleteOnExit();

        cr.setOutput(output);

        cr.execute();

        compare(
                output,
                getFrameworkPath("src/test-data/TestConstructRegistry/testBasic.xml.master"));
    }
View Full Code Here


    public void testLocalRefs() throws Exception
    {
        if (JDK1_3)
            return;

        ConstructRegistry cr = create();

        Path p = cr.createDescriptors();

        p.createPath().setLocation(
                new File(getFrameworkPath("src/test-data/TestConstructRegistry/LocalRefs.xml")));

        File output = File.createTempFile("testLocalRefs-", ".xml");

        // Delete the file, to force the task to re-create it.

        output.delete();

        output.deleteOnExit();

        cr.setOutput(output);

        cr.execute();

        compare(
                output,
                getFrameworkPath("src/test-data/TestConstructRegistry/testLocalRefs.xml.master"));
    }
View Full Code Here

    public void testUptoDate() throws Exception
    {
        if (JDK1_3)
            return;

        ConstructRegistry cr = create();

        Path p = cr.createDescriptors();

        p.createPath().setLocation(
                new File(getFrameworkPath("src/test-data/TestConstructRegistry/master.xml")));
        p.createPath().setLocation(
                new File(getFrameworkPath("src/test-data/TestConstructRegistry/Symbols.xml")));

        File output = File.createTempFile("testUptoDate-", ".xml");

        // Delete the file, to force the task to re-create it.

        output.delete();

        output.deleteOnExit();

        cr.setOutput(output);

        cr.execute();

        compare(
                output,
                getFrameworkPath("src/test-data/TestConstructRegistry/testUptoDate.xml.master"));

        long stamp = output.lastModified();

        cr.execute();

        assertEquals(stamp, output.lastModified());
    }
View Full Code Here

    public void testJars() throws Exception
    {
        if (JDK1_3)
            return;

        ConstructRegistry cr = create();

        Path p = cr.createDescriptors();

        p.createPath().setLocation(
                new File(getFrameworkPath("src/test-data/TestConstructRegistry/master.xml")));
        p.createPath().setLocation(
                new File(getFrameworkPath("src/test-data/TestConstructRegistry/empty.jar")));
        p.createPath().setLocation(
                new File(getFrameworkPath("src/test-data/TestConstructRegistry/module.jar")));

        File output = File.createTempFile("testJars-", ".xml");

        output.delete();

        output.deleteOnExit();

        cr.setOutput(output);

        cr.execute();

        compare(output, getFrameworkPath("src/test-data/TestConstructRegistry/testJars.xml.master"));
    }
View Full Code Here

TOP

Related Classes of org.apache.hivemind.ant.ConstructRegistry

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.