Код: Выделить всё
import java.util.stream.Stream;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.MethodSource;
class ABCTest {
@ParameterizedTest
@MethodSource("abc")
void testABC(String word) {
System.out.println(word);
}
static Stream abc() {
return Stream.of("a1",
"b2");
}
}
Код: Выделить всё
java.lang.NoSuchMethodError: 'java.lang.String[] org.junit.platform.commons.util.ReflectionUtils.parseQualifiedMethodName(java.lang.String)'
.
.
.
Suppressed: org.junit.platform.commons.PreconditionViolationException: Configuration error: You must configure at least one set of arguments for this @ParameterizedTest
at org.junit.platform.commons.util.Preconditions.condition(Preconditions.java:281)
at org.junit.jupiter.params.ParameterizedTestExtension.lambda$provideTestTemplateInvocationContexts$5(ParameterizedTestExtension.java:98)
Код: Выделить всё
4.0.0
pom
4.3.20-SNAPSHOT
1.0.19
UTF-8
17
17
17
3.9.0
2.8.2
3.3.0
true
2.0.8
0.0.66
3.0.15
1.13.1
1.0.11
0.4.3
1.18.22
1.18.20.0
4.12
30.1.1-jre
1.4.191
junit
junit
${junit.version}
test
org.junit.jupiter
junit-jupiter-params
5.9.2
test
com.h2database
h2
${h2.version}
test
io.dropwizard
dropwizard-testing
test
org.javassist
javassist
org.apache.maven.plugins
maven-deploy-plugin
${maven.deploy.plugin.version}
false
org.projectlombok
lombok-maven-plugin
generate-sources
delombok
${lombok.maven.version}
org.apache.maven.plugins
maven-compiler-plugin
${maven.compiler.plugin.version}
${jdk.source.version}
${jdk.target.version}
${jdk.release.version}
true
false
docker
Попробовал изменить версию junit-jupiter-params, как предложено в NoSuchMethodError: org.junit.platform.commons .util.ReflectionUtils.tryToLoadClass, все еще не работает
Подробнее здесь: https://stackoverflow.com/questions/765 ... erizedtest