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

nl.hsac.fitnesse.fixture.fit.ClearStoredVariablesFixture Maven / Gradle / Ivy

There is a newer version: 5.3.17
Show newest version
package nl.hsac.fitnesse.fixture.fit;

import fit.ColumnFixture;

import java.lang.reflect.Method;

/**
 * Fixture to clear stored content.
 */
public class ClearStoredVariablesFixture extends ColumnFixture {
    private String className;
    
    public String clear() throws Exception {
        String result = "NOK";
        String methodName = "clearInstances";
        Class clazz = Class.forName(className);
        if (clazz != null) {
            Method method = clazz.getMethod(methodName);
            if (method != null) {
                method.invoke(null);
                result = "OK";
            }
        }
        return result;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy