开发者

Where to keep static fixtures (files) in Java project?

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).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜