net.jqwik.vavr.arbitraries.control.VavrValidationArbitrary Maven / Gradle / Ivy
package net.jqwik.vavr.arbitraries.control;
import net.jqwik.vavr.arbitraries.base.DoubleValueArbitrary;
import io.vavr.control.Validation;
import net.jqwik.api.Arbitrary;
public class VavrValidationArbitrary extends DoubleValueArbitrary>
implements Arbitrary> {
public VavrValidationArbitrary(final Arbitrary failureArbitrary, final Arbitrary innerArbitrary) {
super(failureArbitrary, innerArbitrary);
}
@Override
protected Validation mapFirstValue(final E value) {
return Validation.invalid(value);
}
@Override
protected Validation mapSecondValue(final T value) {
return Validation.valid(value);
}
}