All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.jqwik.testing.ShrinkToChecker Maven / Gradle / Ivy

There is a newer version: 1.9.1
Show newest version
package net.jqwik.testing;

import java.util.*;
import java.util.function.*;

import org.apiguardian.api.*;

import net.jqwik.api.lifecycle.*;

import static org.apiguardian.api.API.Status.*;
import static org.assertj.core.api.Assertions.*;

@API(status = EXPERIMENTAL, since = "1.4.0")
public abstract class ShrinkToChecker implements Consumer {
	@Override
	public void accept(PropertyExecutionResult propertyExecutionResult) {
		Optional> falsifiedSample = propertyExecutionResult.falsifiedParameters();
		assertThat(falsifiedSample).isPresent();
		assertThat(falsifiedSample.get()).containsExactlyElementsOf(shrunkValues());
	}

	public abstract Iterable shrunkValues();
}






© 2015 - 2024 Weber Informatics LLC | Privacy Policy