org.fluentlenium.adapter.SharedMutator Maven / Gradle / Ivy
package org.fluentlenium.adapter;
import org.fluentlenium.adapter.sharedwebdriver.SharedWebDriverContainer;
import org.fluentlenium.configuration.ConfigurationProperties.DriverLifecycle;
/**
* Defines mutations of parameters used for {@link SharedWebDriverContainer} method calls.
*/
public interface SharedMutator {
/**
* Effective parameters used by the test.
*
* This type is used for creating and identifying {@link org.fluentlenium.adapter.sharedwebdriver.SharedWebDriver}
* instances.
*
* @param type of test
*/
class EffectiveParameters {
private final Class testClass;
private final String testName;
private final DriverLifecycle driverLifecycle;
public EffectiveParameters(Class testClass, String testName, DriverLifecycle driverLifecycle) {
this.testClass = testClass;
this.testName = testName;
this.driverLifecycle = driverLifecycle;
}
public Class getTestClass() {
return testClass;
}
public String getTestName() {
return testName;
}
public DriverLifecycle getDriverLifecycle() {
return driverLifecycle;
}
}
/**
* Effective parameters to use for {@link SharedWebDriverContainer}.
*
* @param testClass test class
* @param testName test name
* @param driverLifecycle WebDriver lifecycle
* @param type of the test class
* @return Effective parameters object.
*/
EffectiveParameters getEffectiveParameters(Class testClass, String testName, DriverLifecycle driverLifecycle);
}