
com.laamella.parameter_source.StubStringParameterSource Maven / Gradle / Ivy
package com.laamella.parameter_source;
import java.util.Optional;
/**
* A string parameter source that returns the same string for all keys.
* Suggested use is testing.
*/
public class StubStringParameterSource implements StringParameterSource {
private String stubValue;
public StubStringParameterSource(String stubValue) {
this.stubValue = stubValue;
}
@Override
public Optional getOptionalString(String key) {
return Optional.ofNullable(stubValue);
}
public void setStubValue(String stubValue) {
this.stubValue = stubValue;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy