Ask Question
7 February, 07:29

A developer is asked to write negative tests as part of the unit testing for a method that calculates a person's age based on birth date. What should the negative tests include

+2
Answers (1)
  1. 7 February, 11:19
    0
    "Verify that the method rejects the future dates" is the correct answer.

    Explanation:

    In the given statement some information is missing, that is options of the question:

    A) Taking the unit test with a custom exception.

    B) Verify that the system accepts a null value.

    C) Verify that the method accepts the past dates

    D) Verify that the method rejects the future dates

    Negative tests also stands for validation that check software can accommodate incorrect feedback on user actions gracefully. This testing indicates the program properly treats erroneous user behavior. It does not accepts unexpected input, and other options are wrong that can be described as follows:

    In option A, It is not correct because this process does not verify the method. Option B and Option C are wrong because both options do not test negative input.
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “A developer is asked to write negative tests as part of the unit testing for a method that calculates a person's age based on birth date. ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers