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

fitlibraryGeneric.specify.genericFinder.GenericAndNonGenericFinder Maven / Gradle / Ivy

Go to download

FitLibrary provides general-purpose fixtures (and runners) for storytests with Fit and FitNesse.

The newest version!
package fitlibraryGeneric.specify.genericFinder;

import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;

import fitlibrary.traverse.DomainAdapter;

@SuppressWarnings("unchecked")
public class GenericAndNonGenericFinder implements DomainAdapter {
	@SuppressWarnings("unused")
	private Pair integerIntegerPair;
	
	public void setIntegerIntegerPair(Pair pair) {
		this.integerIntegerPair = pair;
	}
	public Pair findPair(@SuppressWarnings("unused") String key) {
		return null;
	}
	public Pair findPair(@SuppressWarnings("unused") String key, Type type) {
		if (type instanceof ParameterizedType && ((ParameterizedType)type).getActualTypeArguments()[0] == Integer.class)
			return new Pair(1,2);
		return null;
	}
	public Object getSystemUnderTest() {
		return null;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy