com.github.dreamhead.moco.config.MocoResponseConfig Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of moco-core Show documentation
Show all versions of moco-core Show documentation
Moco is an easy setup stub framework, mainly focusing on testing and integration.
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);
}
}