org.quicktheories.impl.Falsification Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of quicktheories Show documentation
Show all versions of quicktheories Show documentation
Property based testing for Java
The newest version!
package org.quicktheories.impl;
import java.util.Optional;
final class Falsification {
private final Optional cause;
private final T value;
Falsification(T value, Optional cause) {
this.value = value;
this.cause = cause;
}
static Falsification fromException(Throwable t, T value) {
return new Falsification<>(value, Optional.of(t));
}
static Falsification fromProperty(T value) {
return new Falsification<>(value, Optional.empty());
}
T value() {
return this.value;
}
Optional cause() {
return cause;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy