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

info.novatec.testit.livingdoc.call.ResultHandler Maven / Gradle / Ivy

There is a newer version: 1.3.3
Show newest version
package info.novatec.testit.livingdoc.call;

public class ResultHandler implements StubSyntax {
    private final Stub stub;
    private ResultMatcher matcher;

    public ResultHandler(Stub stub) {
        this.stub = stub;
        this.matcher = new AnyResult();
    }

    @Override
    public void when(ResultMatcher resultMatcher) {
        this.matcher = resultMatcher;
    }

    public void handle(Result result) {
        if (matcher.matches(result)) {
            stub.call(result);
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy