
io.magentys.utils.Requires Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cherry Show documentation
Show all versions of cherry Show documentation
A syntactical sugar project for BDD oriented tests
package io.magentys.utils;
import io.magentys.exceptions.RequirementException;
public class Requires {
public static void requires(final Boolean condition, final String errorMessage) {
if (!condition) {
throw new RequirementException(errorMessage);
}
}
public static T requiresNotNull(final T value, final String errorMessage) {
if (value == null) {
throw new RequirementException(errorMessage);
}
return value;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy