On Sunday 15 April 2007, peter murray-rust wrote: > FWIW it has taken us some time to sort of (in Java) how to manage > test files in unit tests. They cannot have absolute filenames or they > fail on different machines. So they tend to live with the test suite > and be accessed by relative URLs. This works fine, but it is slightly > more difficult with files not in the test system. > > For Java, therefore, we need a URI server for the test files. We > would load a Java BO test module under Java/maven so the libraries > were managed. Then we would be able to load input and sample output > files and compare them.
If you puth them in the classpath, then you can load them with: String filename = "data/mdl/prev2000.sd"; logger.info("Testing: " + filename); InputStream ins = this.getClass().getClassLoader().getResourceAsStream(filename); Egon -- [EMAIL PROTECTED] Cologne University Bioinformatics Center (CUBIC) Blog: http://chem-bla-ics.blogspot.com/ GPG: 1024D/D6336BA6 _______________________________________________ Blue-obelisk mailing list Blue-obelisk@hardly.cubic.uni-koeln.de http://hardly.cubic.uni-koeln.de/mailman/listinfo/blue-obelisk