function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Nitish KulkarniNitish Kulkarni 

negative test method for age

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

a. Throwing a custom exception in the uniit test
b. Assert that a null value is accepted by method
c. Assert that past dates are accepted by method
d. Assert that future dates are rejected by the method

I have confusion between A and D someone please explain
 
Raj VakatiRaj Vakati

D) Assert that future dates are rejected by the method -
Nitish KulkarniNitish Kulkarni
why not A.Throwing a custom exception in the uniit test  ?