# FooTest or FooTests? [closed]

Can't make up my mind. For a class Foo, should its test class be called FooTest or FooTests?

-

## closed as off topic by Michael KOct 25 '11 at 16:39

Questions on Code Review Stack Exchange are expected to relate to code review request within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

This is off topic here, as well as being not constructive because of its subjectivity. Code Review is for reviewing code, not naming conventions. –  Michael K Oct 25 '11 at 16:45

I would call it FooTests because it is not a test in itself but a class for tests. Ideal name would be fixture but nobody uses it .

While were are at it make sure to name your methods [MethodName_StateUnderTest_ExpectedBehavior]

-
Yeah, I've been leaning towards that as well. The naming convention you point at, I already use ;) –  Svish Oct 25 '11 at 13:28

I'd call it FooTest because Maven Surefire Plugin use these default include patterns:

 <include>**/Test*.java</include>
<include>**/*Test.java</include>
<include>**/*TestCase.java</include>


So I don't have to modify the include patterns because it wouldn't recognize FooTests with the default settings.

Another alternative is TestFoo which is used by xUnit Patterns website and the book.

-