I'm currently working on the unit tests for the GPX code that will go into my experimental GeoTools module. One of the classes I need to test is the parser of the GPX files. I've got some sample GPX files that I can use for the testing. Normally I would just hardcode the path for the test file into my JUnit test. However, I know that these particular tests will some day be part of the larger GeoTools testing and/or build process, so I want to do things a little differently.
I had in mind a class whose role was to provide files (and maybe other resources) to JUnit tests. This helper class could read a configuration file that mapped a resource name to a file path. If you moved the test code and the code under test to a new files system location, you wouldn't have to change a single line of code, you'd just edit the configuration file used by the helper class. Does GeoTools already have a similar mechanism that other programmers use for their unit testing? Is there a utility class outside of GeoTools that you guys would prefer that I use? (I haven't e-mailed this question to the JUnit mailing list yet. I thought I would ask you guys first.) If there isn't a standard way to handle this in GeoTools, and I whip up a helper class, will other GeoTools programmers be willing to use it in their unit tests? Thanks for suggestions. Landon ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Geotools-devel mailing list Geotools-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel