Skip to content

Commit

Permalink
import MethodParameterSource in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jpenilla committed Dec 23, 2023
1 parent ac8d19f commit 7929038
Showing 1 changed file with 12 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
import org.junit.platform.commons.PreconditionViolationException;
import org.junitpioneer.jupiter.ReportEntry;
import org.junitpioneer.jupiter.cartesian.CartesianTest.Enum.Mode;
import org.junitpioneer.jupiter.cartesian.CartesianTest.MethodParameterSource;
import org.junitpioneer.jupiter.cartesian.CartesianTest.Values;
import org.junitpioneer.jupiter.params.ByteRangeSource;
import org.junitpioneer.jupiter.params.DoubleRangeSource;
Expand Down Expand Up @@ -1188,46 +1189,46 @@ void wrongAllPatternWithOmittedType(
static class CartesianMethodParameterSourceTestCases {

@CartesianTest
void simpleCase(@CartesianTest.MethodParameterSource("abc") String value) {
void simpleCase(@MethodParameterSource("abc") String value) {
}

@CartesianTest
void simpleCaseWithParens(@CartesianTest.MethodParameterSource("abc()") String value) {
void simpleCaseWithParens(@MethodParameterSource("abc()") String value) {
}

@CartesianTest
void simpleCaseFullyQualified(
@CartesianTest.MethodParameterSource("org.junitpioneer.jupiter.cartesian.CartesianTestExtensionTests$CartesianMethodParameterSourceTestCases#abc") String value) {
@MethodParameterSource("org.junitpioneer.jupiter.cartesian.CartesianTestExtensionTests$CartesianMethodParameterSourceTestCases#abc") String value) {
}

@CartesianTest
void multipleMethods(@CartesianTest.MethodParameterSource({ "abc", "oneTwoThree" }) String value) {
void multipleMethods(@MethodParameterSource({ "abc", "oneTwoThree" }) String value) {
}

@CartesianTest
void multipleParameters(@CartesianTest.MethodParameterSource("abc") String value1,
@CartesianTest.MethodParameterSource("oneTwoThree") String value2) {
void multipleParameters(@MethodParameterSource("abc") String value1,
@MethodParameterSource("oneTwoThree") String value2) {
}

@CartesianTest
void noSuchMethodSimple(@CartesianTest.MethodParameterSource("doesNotExist") String value) {
void noSuchMethodSimple(@MethodParameterSource("doesNotExist") String value) {
}

@CartesianTest
void noSuchMethodFullyQualified(
@CartesianTest.MethodParameterSource("org.junitpioneer.jupiter.cartesian.CartesianTestExtensionTests$CartesianMethodParameterSourceTestCases#doesNotExist") String value) {
@MethodParameterSource("org.junitpioneer.jupiter.cartesian.CartesianTestExtensionTests$CartesianMethodParameterSourceTestCases#doesNotExist") String value) {
}

@CartesianTest
void noSuchClass(@CartesianTest.MethodParameterSource("a.b.C#doesNotExist") String value) {
void noSuchClass(@MethodParameterSource("a.b.C#doesNotExist") String value) {
}

@CartesianTest
void factoryIsTestMethod(@CartesianTest.MethodParameterSource("invalidFactoryTest") String value) {
void factoryIsTestMethod(@MethodParameterSource("invalidFactoryTest") String value) {
}

@CartesianTest
void invalidFactoryReturnType(@CartesianTest.MethodParameterSource("invalidFactoryReturnType") String value) {
void invalidFactoryReturnType(@MethodParameterSource("invalidFactoryReturnType") String value) {
}

@Test
Expand Down

0 comments on commit 7929038

Please sign in to comment.