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 8506155
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T02:31:04+00:00 2026-06-11T02:31:04+00:00

It seams that it is unreasonable to put more than one test methods in

  • 0

It seams that it is unreasonable to put more than one test methods in a test class, since it does not make sense to add two sets of static data points in one class. Is it a best practice to have only one test method in a test class?

  • 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-06-11T02:31:05+00:00Added an answer on June 11, 2026 at 2:31 am

    No. There are several methods to have multiple Theories in a single test class.

    1. You might have @DataPoints of different types
    2. You might have different sets of @DataPoints of the same type (for example one being valid cases and one invalid) and use assumeThat to limit a @Theory to only use values from one set.
    3. You might have @Tests as well as @Theorys in the same test class
    4. You could use Enclosed runner to run multiple inner classes each with their own set of exclusive @DataPoints

    Much of this depends of course on the complexity of the class under test. But I usually mix @Theory with @Test and in several cases had multiple different @DataPoints. A common example of this is a class with multiple setters each taking a different type.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Pixel Perfect https://addons.mozilla.org/en-US/firefox/addon/pixel-perfect/ Is not working any more on FF6 and seams that they
It seams that we are not able to create a team within Organization but
It seems that runClasses() doesn't terminate the code being tested even after the test
It seems that often I find that my code when moving either from one
It seems that it is not advisable to use <meta http-equiv=REFRESH CONTENT=3;url=url> for redirects
PSPS: (a Pre-scripted Post-script) It has just come to mind that a more prescient
How can I use clip-path with Raphaël.js like this example . It seams that
I have a problem when optimizing code, and it seams that the reason is
I have a dictionary of keywords that I want to make available for autocomplete/suggestion
I need to use transactions in a project and it seams that they just

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.