
com.github.becausetesting.args.MonthValidator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of commons Show documentation
Show all versions of commons Show documentation
A common libraries used for testing framework.
package com.github.becausetesting.args;
import com.beust.jcommander.IParameterValidator;
import com.beust.jcommander.ParameterException;
/**
* ClassName: MonthValidator
* Function: TODO ADD FUNCTION.
* Reason: TODO ADD REASON
* date: Apr 23, 2016 6:06:25 PM
* @author [email protected]
* @version 1.0.0
* @since JDK 1.8
*/
public class MonthValidator implements IParameterValidator {
@Override
public void validate(String name, String value) throws ParameterException {
// TODO Auto-generated method stub
int month = Integer.parseInt(value);
if(month<1||month>12){
throw new ParameterException("Parameter " + name + " should be between 1 and 12");
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy