net.serenitybdd.jbehave.converters.TimeConverter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of serenity-jbehave Show documentation
Show all versions of serenity-jbehave Show documentation
Serenity JBehave integration
package net.serenitybdd.jbehave.converters;
import org.jbehave.core.steps.ParameterConverters;
import org.joda.time.LocalTime;
import java.lang.reflect.Type;
public class TimeConverter implements ParameterConverters.ParameterConverter {
public boolean accept(Type type) {
if (type instanceof Class>) {
return LocalTime.class.isAssignableFrom((Class>) type);
}
return false;
}
public Object convertValue(String value, Type type) {
return LocalTime.parse(value);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy