org.testng.junit5.MethodDescriptor Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of testng-junit5 Show documentation
Show all versions of testng-junit5 Show documentation
Implementation of the JUnit5 Platform TestEngine interface
The newest version!
package org.testng.junit5;
import java.lang.reflect.Method;
import org.junit.platform.engine.UniqueId;
import org.junit.platform.engine.support.descriptor.AbstractTestDescriptor;
import org.junit.platform.engine.support.descriptor.MethodSource;
public class MethodDescriptor extends AbstractTestDescriptor {
static MethodDescriptor newMethodDescriptor(UniqueId container, Method method) {
UniqueId id = container.append("testng-method", method.getName());
return new MethodDescriptor(id, method);
}
private final Method method;
private MethodDescriptor(UniqueId uniqueId, Method method) {
super(uniqueId, method.getName(), MethodSource.from(method));
this.method = method;
}
@Override
public Type getType() {
return Type.TEST;
}
public Method getMethod() {
return method;
}
}