com.flextrade.jfixture.customisation.InterceptingCustomisation Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jfixture Show documentation
Show all versions of jfixture Show documentation
JFixture is an open source library based on the popular .NET library, AutoFixture
package com.flextrade.jfixture.customisation;
import com.flextrade.jfixture.JFixture;
import com.flextrade.jfixture.behaviours.intercept.InterceptBehaviour;
import com.flextrade.jfixture.utility.Interceptor;
public class InterceptingCustomisation implements Customisation {
private final Class classToIntercept;
private final Interceptor interceptor;
public InterceptingCustomisation(Class classToIntercept, Interceptor interceptor) {
this.classToIntercept = classToIntercept;
this.interceptor = interceptor;
}
@Override
public void customise(JFixture fixture) {
fixture.behaviours().add(new InterceptBehaviour(classToIntercept, interceptor));
}
}