net.serenitybdd.junit.finder.TestMethodFinder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of serenity-junit Show documentation
Show all versions of serenity-junit Show documentation
Serenity JUnit integration
package net.serenitybdd.junit.finder;
import java.lang.reflect.Method;
import java.util.List;
import java.util.stream.Collectors;
public class TestMethodFinder {
private final TestFinder testFinder;
public TestMethodFinder(TestFinder testFinder) {
this.testFinder = testFinder;
}
public List withNameContaining(String partialName) {
return testFinder.getAllTestMethods().stream()
.filter(testMethod -> testMethod.getName().contains(partialName))
.collect(Collectors.toList());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy