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

com.github.tomakehurst.wiremock.matching.ContainsPattern Maven / Gradle / Ivy

package com.github.tomakehurst.wiremock.matching;

import com.fasterxml.jackson.annotation.JsonProperty;

public class ContainsPattern extends StringValuePattern {

    public ContainsPattern(@JsonProperty("contains") String expectedValue) {
        super(expectedValue);
    }

    public String getContains() {
        return expectedValue;
    }

    @Override
    public MatchResult match(String value) {
        return MatchResult.of(value.contains(expectedValue));
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy