Answer: Test cases for Sum(int a, int b) method.
- Only int data type is accepted: Need to test if Sum () method accept only int data type as a parameter.
- Only addition function accepted: Method should return only addition of two numbers. Verify if the output value is equivalent to sum of the input.
- Verify for non –int type data: Verify if variable is a numeric and int type only and do not accept alpha characters or others.
- Test boundary conditions: int data type has a range e.g. -32,767 to 32,767. So, we need to test Sum() function with boundary conditions for example 32,767, 32,768 and -32,766 etc.