https://kotlinlang.org logo
#getting-started
Title
# getting-started
l

Lukasz Kalnik

03/20/2023, 9:27 AM
I'm trying to use JUnit Pioneer
@CartesianTest.Values
annotation with an array literal, but I get an error (Kotlin 1.8.10):
w

Wout Werkman

03/20/2023, 9:35 AM
You should annotate the member function with
CartesianTest
, and the parameters with
CartesianTest.Values
. This error you see is because you use an annotation that is meant for parameters on a member function
l

Lukasz Kalnik

03/20/2023, 9:36 AM
Sorry, I cut away too much while making the screenshot. I have the
@CartesianTest
annotation.
image.png
w

Wout Werkman

03/20/2023, 9:37 AM
These are not applicable to the same target.
CartesianTest
is for functions,
CartesianTest.Values
is for parameters.
l

Lukasz Kalnik

03/20/2023, 9:38 AM
My bad!
I was thinking about it the same way as the Jupiter
@ValueSource
annotation.
👍 1
Thanks so much for quick help!
w

Wout Werkman

03/20/2023, 9:39 AM
No worries, happy to help 🙂
43 Views