Package org.apache.hivemind.ant

Examples of org.apache.hivemind.ant.ConstructRegistry


    protected ConstructRegistry create()
    {
        Target t = new Target();

        ConstructRegistry result = new ConstructRegistry();
        result.setProject(_project);
        result.setOwningTarget(t);
        result.setTaskName("constructRegistry");

        return result;
    }
View Full Code Here


        return result;
    }

    public void testNoFile() throws Exception
    {
        ConstructRegistry cr = create();

        try
        {
            cr.execute();
            unreachable();
        }
        catch (BuildException ex)
        {
            assertExceptionSubstring(ex, "You must specify an output file");
View Full Code Here

        }
    }

    public void testNoDescriptors() throws Exception
    {
        ConstructRegistry cr = create();

        File f = File.createTempFile("testNoDescriptors-", ".xml");

        cr.setOutput(f);

        assertSame(f, cr.getOutput());

        try
        {
            cr.execute();
            unreachable();
        }
        catch (BuildException ex)
        {
            assertExceptionSubstring(ex, "You must specify a set of modules");
View Full Code Here

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

        ConstructRegistry cr = create();

        Path p = cr.createModules();

        p.createPath().setLocation(
                new File(getFrameworkPath("/test-data/TestConstructRegistry/master.xml")));
        p.createPath().setLocation(
                new File(getFrameworkPath("/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("/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.createModules();

        p.createPath().setLocation(
                new File(getFrameworkPath("/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("/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.createModules();

        p.createPath().setLocation(
                new File(getFrameworkPath("/test-data/TestConstructRegistry/master.xml")));
        p.createPath().setLocation(
                new File(getFrameworkPath("/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("/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.createModules();

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


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

        output.delete();

        output.deleteOnExit();

        cr.setOutput(output);

        cr.execute();

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

    protected ConstructRegistry create()
    {
        Target t = new Target();

        ConstructRegistry result = new ConstructRegistry();
        result.setProject(_project);
        result.setOwningTarget(t);
        result.setTaskName("constructRegistry");

        return result;
    }
View Full Code Here

        return result;
    }

    public void testNoFile() throws Exception
    {
        ConstructRegistry cr = create();

        try
        {
            cr.execute();
            unreachable();
        }
        catch (BuildException ex)
        {
            assertExceptionSubstring(ex, "You must specify an output file");
View Full Code Here

        }
    }

    public void testNoDescriptors() throws Exception
    {
        ConstructRegistry cr = create();

        File f = File.createTempFile("testNoDescriptors-", ".xml");

        cr.setOutput(f);

        assertSame(f, cr.getOutput());

        try
        {
            cr.execute();
            unreachable();
        }
        catch (BuildException ex)
        {
            assertExceptionSubstring(ex, "You must specify a set of module descriptors");
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.