com.jparams.junit4.data.converter.EnumConverter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jparams-junit4 Show documentation
Show all versions of jparams-junit4 Show documentation
Parameterized JUnit4 Tests
package com.jparams.junit4.data.converter;
import com.jparams.junit4.reflection.MethodParameter;
public class EnumConverter implements Converter {
@Override
public Object convert(Object data, MethodParameter methodParameter) {
Class extends Enum> type = (Class extends Enum>) methodParameter.getType();
return Enum.valueOf(type, data.toString());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy