Ask Question
1 April, 10:47

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

+1
Answers (1)
  1. 1 April, 13:14
    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?
Find 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 and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers