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 -
- short
- byte
- int
- long
- float
- double
- char
- java.lang.String
- java.lang.Class
Let’s look into a demo.
Step 1 - Let’s create a class ...