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