Re: Building with JUnit

From: Mike Kienenberger (mkienen..laska.net)
Date: Tue Feb 08 2005 - 11:29:59 EST

  • Next message: Joel Trunick: "Modeller / Joins"

    Joel Trunick <joel.trunic..ebifysolutions.com> wrote:
    > Is there any sample build scripts for Cayenne that will let me build
    > JUnit tests and run against something like HSQL, but deploy to say
    > Resin/MySQL?
    >
    > I tried to use AppFuse to get an idea of how to do this, but its not
    > clear to me how to rebuild the (HSQL) database using Cayenne info

    Someone recently posted a code sample for rebuilding the database schema
    from the model using org.objectstyle.cayenne.access.DBGenerator.

    > and basically maintain two different datasource between build (for JUnit)
    > and deploy, at least in any kind of convenient manner.

    I do this by specifying an alternate Configuration class in the superclass
    setUp() method for all of my test classes.

            FileConfiguration conf = new
    FileConfiguration("cayenne-testing.xml");
            conf.addFilesystemPath(new File("WEB-INF"));
            Configuration.initializeSharedConfiguration(conf);



    This archive was generated by hypermail 2.0.0 : Tue Feb 08 2005 - 11:29:41 EST