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

net.serenitybdd.jbehave.converters.TimeConverter Maven / Gradle / Ivy

There is a newer version: 1.46.0
Show newest version
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