net.jqwik.vavr.arbitraries.control.VavrTryArbitrary Maven / Gradle / Ivy
package net.jqwik.vavr.arbitraries.control;
import net.jqwik.vavr.arbitraries.base.DoubleValueArbitrary;
import io.vavr.control.Try;
import net.jqwik.api.Arbitrary;
public class VavrTryArbitrary extends DoubleValueArbitrary>
implements Arbitrary> {
public VavrTryArbitrary(final Arbitrary innerArbitrary, final Arbitrary exceptionArbitrary) {
super(innerArbitrary, exceptionArbitrary);
}
@Override
protected Try mapFirstValue(final T value) {
return Try.success(value);
}
@Override
protected Try mapSecondValue(final Throwable value) {
return Try.failure(value);
}
}