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

com.github.dreamhead.moco.config.MocoRequestConfig 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.RequestMatcher;

import static com.github.dreamhead.moco.Moco.and;

public final class MocoRequestConfig implements MocoConfig {
    private final RequestMatcher requestMatcher;

    public MocoRequestConfig(final RequestMatcher requestMatcher) {
        this.requestMatcher = requestMatcher;
    }

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

    @Override
    public RequestMatcher apply(final RequestMatcher target) {
        return and(requestMatcher, target);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy