com.cvent.dropwizard.mybatis.dataaccess.testing.IdentityWrappedInvoker Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dropwizard-mybatis Show documentation
Show all versions of dropwizard-mybatis Show documentation
An open source bridge layer so that you can use mybatis with dropwizard + other useful utility methods often used within an enterprise.
package com.cvent.dropwizard.mybatis.dataaccess.testing;
import com.cvent.dropwizard.mybatis.dataaccess.WrappedInvoker;
import java.util.function.Function;
/**
* This is a simple class for testing classes that use instances of WrappedInvoker. You can pass a mock in the
* constructor and get the mocked result right back by calling invoke.
* @param
*/
public class IdentityWrappedInvoker implements WrappedInvoker {
private final T object;
public IdentityWrappedInvoker(T object) {
this.object = object;
}
@Override
public TResult invoke(Function function) {
return function.apply(object);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy