
org.fluentlenium.adapter.cucumber.FluentCucumberSharedMutator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fluentlenium-cucumber Show documentation
Show all versions of fluentlenium-cucumber Show documentation
Cucumber JVM Extension for FluentLenium
package org.fluentlenium.adapter.cucumber;
import org.fluentlenium.adapter.SharedMutator;
import org.fluentlenium.configuration.ConfigurationException;
import org.fluentlenium.configuration.ConfigurationProperties.DriverLifecycle;
/**
* Cucumber implementation of {@link SharedMutator}, replacing testClass with a null reference as it doesn't make sense
* and raising a {@link org.fluentlenium.configuration.ConfigurationException} when {@link DriverLifecycle#CLASS} is given.
* to link {@link org.openqa.selenium.WebDriver} instances with classes defining Step.
*/
public class FluentCucumberSharedMutator implements SharedMutator {
@Override
public EffectiveParameters getEffectiveParameters(Class testClass, String testName,
DriverLifecycle driverLifecycle) {
if (driverLifecycle == DriverLifecycle.CLASS) {
throw new ConfigurationException("Cucumber doesn't support CLASS driverLifecycle.");
}
return new EffectiveParameters<>(null, testName, driverLifecycle);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy