I’m testing a number of classes which manipulate files on disc. I created a number of “mocked” files which I will pass to these classes. The question is where in my directory tree I should save them? I’m using Maven.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It sounds like they should be in
src/main/resources, if you need them at runtime, orsrc/test/resourcesif they’re merely inputs to tests.This is assuming that they’re otherwise opaque data files with no special properties that Maven can do anything interesting with (for example, XSD schemas/SQL/scripting language files).