1. Learn
  2. /
  3. Courses
  4. /
  5. Introduction to Testing in Java

Connected

Exercise

ParameterizedTest: List sum

In this exercise, you will practice providing objects as arguments for parameterized tests. Consider the sumList method and the test cases for it.

Complete the parameterized test and the arguments method.

Instructions

100 XP
  • Use the correct annotation for a method source and provide the method name.
  • Declare the arguments provider method, making sure it has the correct keywords and return type.
  • For the final Arguments object, use null and its expected sum.