jp.co.moneyforward.autotest.framework.utils.Valid8JCliches Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of insdog-all Show documentation
Show all versions of insdog-all Show documentation
An action-based testing framework and library
The newest version!
package jp.co.moneyforward.autotest.framework.utils;
import com.github.valid8j.pcond.core.printable.PrintablePredicateFactory;
import com.github.valid8j.pcond.fluent.Statement;
import com.github.valid8j.pcond.forms.Predicates;
import com.github.valid8j.pcond.forms.Printables;
import com.github.valid8j.pcond.validator.Validator;
import jp.co.moneyforward.autotest.framework.internal.InternalUtils;
import java.util.List;
import java.util.Map;
import java.util.function.Function;
import java.util.function.Predicate;
///
/// A container class for utility classes for **valid8j** usages.
///
/// This class may hold utility methods and various inner classes.
/// They should be fed back to the **valid8j** community and once those are implemented as its out-of-box features,
/// usages of them should be replaced with the new features in **valid8j**.
///
///
public enum Valid8JCliches {
;
///
/// This is a method to workaround issue: [valid8j:issue-16](https://github.com/valid8j/valid8j/issues/16[valid8j/issue-16)
/// Once it is fixed, usages of this method should be replaced with `Expectations.assumeStatement`.
///
/// @param statement A statement
/// @param Type of the value
///
public static void assumeStatement(Statement statement) {
Validator.INSTANCE.get().validate(statement.statementValue(),
statement.statementPredicate(),
msg -> {
throw new InternalUtils.AssumptionViolation(msg);
});
}
public static Function © 2015 - 2025 Weber Informatics LLC | Privacy Policy