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

fitnesse.slim.test.TestSlimInvocationAware Maven / Gradle / Ivy

There is a newer version: 20241026
Show newest version
package fitnesse.slim.test;

import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.List;

import fitnesse.slim.fixtureInteraction.FixtureInteraction;
import fitnesse.slim.fixtureInteraction.InteractionAwareFixture;

public class TestSlimInvocationAware extends TestSlim implements InteractionAwareFixture {
  private static final List METHODS = new ArrayList<>();

  @Override
  public Object aroundSlimInvoke(FixtureInteraction fixtureInteraction, Method method, Object... arguments) throws Throwable {
    METHODS.add(method.getName());
    return fixtureInteraction.methodInvoke(method, this, arguments);
  }

  public static void resetMethodsCalled() {
    METHODS.clear();
  }

  public static List getMethodsCalled() {
    return METHODS;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy