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

net.jqwik.engine.providers.EnumArbitraryProvider Maven / Gradle / Ivy

The newest version!
package net.jqwik.engine.providers;

import java.util.*;

import net.jqwik.api.*;
import net.jqwik.api.providers.*;

public class EnumArbitraryProvider implements ArbitraryProvider {

	@Override
	public boolean canProvideFor(TypeUsage targetType) {
		return targetType.isEnum();
	}

	@SuppressWarnings({"rawtypes", "unchecked"})
	@Override
	public Set> provideFor(TypeUsage targetType, SubtypeProvider subtypeProvider) {
		return Collections.singleton(Arbitraries.of((Class) targetType.getRawType()));
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy