Add method for printing current jupiter test name

This commit is contained in:
ghubstan 2020-10-27 13:03:48 -03:00
parent f1db254073
commit b8ae566b69
No known key found for this signature in database
GPG Key ID: E35592D6800A861E

View File

@ -26,6 +26,8 @@ import java.util.Map;
import java.util.concurrent.ExecutionException;
import java.util.stream.Collectors;
import org.junit.jupiter.api.TestInfo;
import static java.util.Arrays.stream;
import static java.util.concurrent.TimeUnit.MILLISECONDS;
@ -117,4 +119,10 @@ public class ApiTestCase {
// empty
}
}
protected final String testName(TestInfo testInfo) {
return testInfo.getTestMethod().isPresent()
? testInfo.getTestMethod().get().getName()
: "unknown test name";
}
}