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

org.testng.junit5.MethodDescriptor Maven / Gradle / Ivy

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;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy