com.github.dreamhead.moco.config.MocoFileRootConfig 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.Files.join;
public final class MocoFileRootConfig implements MocoConfig {
private final String fileRoot;
public MocoFileRootConfig(final String fileRoot) {
this.fileRoot = fileRoot;
}
@Override
public boolean isFor(final String id) {
return FILE_ID.equalsIgnoreCase(id);
}
@Override
public String apply(final String filename) {
return join(this.fileRoot, filename);
}
}