I use NetBeans 8.1. A project was created using an existing source. Build scripts was generated by NetBeans. I have to write unit test for a library that will be dustributed as separated jar file. A method from this library try to get a resource file using code like
Class.class.getResourceAsStream("text/text.txt");
The build script put required file to jar. When I try to run separate test file. Mentioned cannot find this resources. I cannot understand where this files schould be placed when particular unit test run. I try to put required files to folder build/test/
Aucun commentaire:
Enregistrer un commentaire