public final class TestCaseUtils
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static org.junit.jupiter.api.DynamicTest |
toJUnit5DynamicTest(TestCase testCase)
Convert Grava test case to JUnit's dynamic test to use within a test factory scenario.
|
public static org.junit.jupiter.api.DynamicTest toJUnit5DynamicTest(TestCase testCase)
class FooTest {
@TestFactory
Stream<DynamicTest> checkWellBehavedPlugin() {
return new WellBehavedPluginTester()
.pluginType(WellBehavedTestPlugin.class)
.qualifiedPluginId("gravatesting.well-behaved-plugin")
.stream()
.map(TestCaseUtils::toJUnit5DynamicTest);
}
}
testCase - a test case to convert into DynamicTest, must not be null