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

com.cvent.dropwizard.mybatis.dataaccess.testing.IdentityWrappedInvoker Maven / Gradle / Ivy

Go to download

An open source bridge layer so that you can use mybatis with dropwizard + other useful utility methods often used within an enterprise.

There is a newer version: 4.0.4
Show newest version
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