All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.serenitybdd.junit.finder.TestMethodFinder Maven / Gradle / Ivy

There is a newer version: 4.2.9
Show newest version
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