org.testng.internal.reflect.DirectMethodMatcher Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of testng Show documentation
Show all versions of testng Show documentation
Testing framework for Java
package org.testng.internal.reflect;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import static org.testng.internal.reflect.InjectableParameter.Assistant.ALL_INJECTS;
import static org.testng.internal.reflect.InjectableParameter.Assistant.NONE;
/**
* Checks for method argument match with or without filtering injectables.
*
* @author Nitin Verma
*/
public class DirectMethodMatcher extends AbstractNodeMethodMatcher {
public DirectMethodMatcher(final MethodMatcherContext context) {
super(context);
}
/**
* {@inheritDoc}
*/
@Override
protected List> getConformanceInjectsOrder() {
final List> injectsOrder = new ArrayList<>(1);
injectsOrder.add(ALL_INJECTS);
injectsOrder.add(NONE);
return injectsOrder;
}
/**
* {@inheritDoc}
*/
@Override
protected boolean match(final Parameter[] parameters, final Object[] arguments) {
return ReflectionRecipes.exactMatch(parameters, getContext().getArguments());
}
/**
* {@inheritDoc}
*/
@Override
protected Object[] matchingArguments(Parameter[] parameters, Object[] arguments) {
return arguments;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy