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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T06:21:47+00:00 2026-05-18T06:21:47+00:00

If the expected result of the method being tested exists in the official documentation

  • 0

If the expected result of the method being tested exists in the official documentation of the method, then indicating the expected result in the test names would be redundant. In fact, if the purpose is to document the method, then the documentation should be written in the method’s XML documentation which would provide Intellisense info and more.

Why must anything besides the method being tested really be included in a test name?

  • 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-18T06:21:48+00:00Added an answer on May 18, 2026 at 6:21 am

    It’s a matter of convention and development practice. If you’re implementing using TDD, documenting the expected result in the test name keeps you focused on your goal. There is also no XML docs to specify the expected result on as you haven’t implemented the class yet. (You’re writing the test first.) The additional benefit here is that documenting the expected result in the test means that you can execute the specification (aka test) and verify that it is correct. You can’t execute XML docs. 🙂 (You do have to make sure that test name and test code match though. This is easier than making sure test code and XML docs in another file match.)

    Beyond that, there are tools that will extract class/method names and generate specification documents for you in HTML. This allows you to easily generate reports that can be reviewed by all stakeholders. You would want to do this for high-level tests/specs, such as “When a 10 percent single-item discount code is applied during checkout, the most expensive item in the shopping cart is discounted by 10 percent.” This allows stakeholders to verify (because the specs are executing/passing) that the system implements certain business-relevant features.

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

Sidebar

Related Questions

Steps: Run the build including unit tests. Expected result: the unit tests are executed
The example code of section 10.6, the expected result is: after several iterations, the
Update: I've corrected the post, so the question is closed. Expected result: Menu width
In our project, test procedures and expected test results (test specifications) are created in
I'm using the jquery validation control remote method to test if an email address
I don't understand why these two implementations produce different results? Method with expected results:
I'm trying to find a way to fake the result of a method called
I am having some trouble getting expected results out of the zip command. Cases
I have a simple Nhibernate Linq query that is returning more results than expected:
public class Test { boolean[][] expectedResults = new boolean[8][2]; expectedResults[0] = new boolean[] {false,

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.