com.github.dreamhead.moco.parser.model.ReplayModifierContainer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of moco-runner Show documentation
Show all versions of moco-runner Show documentation
Moco is an easy setup stub framework, mainly focusing on testing and integration.
package com.github.dreamhead.moco.parser.model;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.github.dreamhead.moco.ResponseElement;
import com.github.dreamhead.moco.parser.deserializer.ReplayModifierContainerDeserializer;
import static com.github.dreamhead.moco.Moco.template;
import static com.github.dreamhead.moco.Moco.with;
@JsonDeserialize(using = ReplayModifierContainerDeserializer.class)
public class ReplayModifierContainer {
private String text;
private ResponseSetting setting;
public ReplayModifierContainer(final String text) {
this.text = text;
}
public ReplayModifierContainer(final ResponseSetting setting) {
this.setting = setting;
}
public final ResponseElement getResponseHandler() {
if (text != null) {
return with(template(text));
}
return this.setting.getResponseHandler();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy