org.testng.internal.reflect.MethodMatcherContext 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
A testing framework for the JVM
package org.testng.internal.reflect;
import org.testng.ITestContext;
import org.testng.ITestResult;
import java.lang.reflect.Method;
/**
* Input context for MethodMatchers.
*
* @author Nitin Verma
*/
public class MethodMatcherContext {
private final Method method;
private final Parameter[] methodParameter;
private final Object[] arguments;
private final ITestContext testContext;
private final ITestResult testResult;
/**
* Constructs a context for MethodMatchers.
*
* @param method current method.
* @param arguments user arguments.
* @param testContext current test context.
* @param testResult current test results.
*/
public MethodMatcherContext(
final Method method,
final Object[] arguments,
final ITestContext testContext,
final ITestResult testResult) {
this.method = method;
this.methodParameter = ReflectionRecipes.getMethodParameters(method);
this.arguments = arguments;
this.testContext = testContext;
this.testResult = testResult;
}
public Parameter[] getMethodParameter() {
return methodParameter;
}
public Method getMethod() {
return method;
}
public Object[] getArguments() {
return arguments;
}
public ITestContext getTestContext() {
return testContext;
}
public ITestResult getTestResult() {
return testResult;
}
}