Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 898443
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T15:02:36+00:00 2026-05-15T15:02:36+00:00

Class under test MyClass.java JUnit test case name alternatives: TestMyClass.java MyClassTest.java http://moreunit.sourceforge.net seems to

  • 0

Class under test MyClass.java
JUnit test case name alternatives:

TestMyClass.java
MyClassTest.java

http://moreunit.sourceforge.net seems to use “Test” as prefix default but I have seen both uses. Both seems to be recognized when running the entire project as unit test in eclipse as it is the annotation inside classes that are parsed for @Test. I guess maven does the same thing.

Which is preferred?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T15:02:37+00:00Added an answer on May 15, 2026 at 3:02 pm

    Another argument for suffix – at least in english language:

    A class usually represents a noun, it is a model of a concept. An instance of one of your tests would be a ‘MyClass test’. In contrast, a method would model some kind of action, like ‘test [the] calculate [method]’.

    Because of this, I’d always use the ‘suffix’ for test classes and the prefix for test methods:

    the MyClass test          --> MyClassTest
    test the calculate method --> testCalculate()
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

According to, http://www.freshvanilla.org:8080/display/www/Java+Interview+Questions Under Which class is the superclass of every class? null seems
I have the following code: [test.h] class MyClass { public: string Name; MyClass(); void
I have an inline member function defined under class MyClass int MyClass::myInlineFunction(); This function
I've written the following JUnit test, which uses ArgumentMatchers . MyClass classUnderTest = new
What's the convention for making my mocha tests aware of my class under test
Please help this Linq newbie! I'm creating a list inside my class under test,
I created a class under 'src' dir. I'm using this code to access the
This is the output I'm getting while compiling my class under Lubuntu 12.04 32bit
In application.rb, I have config.autoload_paths += %W(#{config.root}/lib So when I modify a class under
I have a simple class Student under namespace School. namespace XmlTestApp { public class

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.