...

/

ParameterizedTest with @MethodSource

ParameterizedTest with @MethodSource

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

We'll cover the following...

@MethodSource

@MethodSource allows us to specify a factory method for different test arguments. This factory method must be static and can be present in the same class or any other class too. The factory method should return Stream, Iterator, Iterable or array of elements to @ParameterizedTest ...

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