Skip to content

Commit 7a3c594

Browse files
author
Pierre-Yves Fourmond
committed
Simplification
1 parent 2c84483 commit 7a3c594

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

src/TestHelper.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,12 @@ static String runApplication(String name, String... args) {
2828

2929
private static void runTests(Object instance) {
3030
Arrays.stream(instance.getClass().getDeclaredMethods())
31+
.filter(method -> method.getName().toLowerCase().contains("test"))
3132
.forEach(method -> runTest(instance, method));
3233
}
3334

3435
private static void runTest(Object instance, Method method) {
3536
var testName = method.getName();
36-
if (!testName.contains("Test")) {
37-
return;
38-
}
3937
try {
4038
method.invoke(instance);
4139
IO.println("✅ Test %s is successful".formatted(testName));

0 commit comments

Comments
 (0)