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

com.github.dreamhead.moco.config.MocoResponseConfig Maven / Gradle / Ivy

Go to download

Moco is an easy setup stub framework, mainly focusing on testing and integration.

There is a newer version: 1.5.0
Show newest version
package com.github.dreamhead.moco.config;

import com.github.dreamhead.moco.MocoConfig;
import com.github.dreamhead.moco.ResponseHandler;

import static com.github.dreamhead.moco.handler.AndResponseHandler.and;

public class MocoResponseConfig implements MocoConfig {
    private final ResponseHandler handler;

    public MocoResponseConfig(final ResponseHandler handler) {
        this.handler = handler;
    }

    @Override
    public boolean isFor(final String id) {
        return RESPONSE_ID.equalsIgnoreCase(id);
    }

    @Override
    public ResponseHandler apply(final ResponseHandler target) {
        return and(handler, target);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy