com.github.dreamhead.moco.config.MocoContextConfig 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 static com.github.dreamhead.moco.util.URLs.join;
public final class MocoContextConfig implements MocoConfig {
private final String context;
public MocoContextConfig(final String context) {
this.context = context;
}
@Override
public boolean isFor(final String id) {
return URI_ID.equalsIgnoreCase(id);
}
@Override
public String apply(final String uri) {
return join(context, uri);
}
}