I'm testing a number 开发者_C百科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.
It sounds like they should be in src/main/resources
, if you need them at runtime, or src/test/resources
if 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).
精彩评论