package test.listeners;

import java.lang.reflect.Constructor;
import java.lang.reflect.Method;
import java.util.List;
import org.testng.*;
import org.testng.annotations.ITestAnnotation;

public class SuiteListener2
    implements IAnnotationTransformer,
        IInvokedMethodListener,
        ITestListener,
        ISuiteListener,
        IExecutionListener,
        IMethodInterceptor {
  public static int start = 0;
  public static int finish = 0;

  @Override
  public void onFinish(ISuite suite) {
    finish++;
  }

  @Override
  public void onStart(ISuite suite) {
    start++;
  }

  @Override
  public void beforeInvocation(IInvokedMethod method, ITestResult testResult) {}

  @Override
  public void afterInvocation(IInvokedMethod method, ITestResult testResult) {}

  @Override
  public void transform(
      ITestAnnotation annotation,
      Class testClass,
      Constructor testConstructor,
      Method testMethod) {}

  @Override
  public void onExecutionStart() {}

  @Override
  public void onExecutionFinish() {}

  @Override
  public List<IMethodInstance> intercept(List<IMethodInstance> methods, ITestContext context) {
    return methods;
  }

  @Override
  public void onTestStart(ITestResult result) {}

  @Override
  public void onTestSuccess(ITestResult result) {}

  @Override
  public void onTestFailure(ITestResult result) {}

  @Override
  public void onTestSkipped(ITestResult result) {}

  @Override
  public void onTestFailedButWithinSuccessPercentage(ITestResult result) {}

  @Override
  public void onStart(ITestContext context) {}

  @Override
  public void onFinish(ITestContext context) {}
}
