...

/

Parameterized Test with @ValueSource

Parameterized Test with @ValueSource

This lesson demonstrates use of @ValueSource to pass different arguments to @ParameterizedTest.

We'll cover the following...

@ValueSource

@ValueSource is one of the simplest ways to pass arguments array to @ParameterizedTest method. This array can be of following types -

  1. short
  2. byte
  3. int
  4. long
  5. float
  6. double
  7. char
  8. java.lang.String
  9. java.lang.Class

Let’s look into a demo.

...

Access this course and 1400+ top-rated courses and projects.