Search in sources :

Example 1 with TextBodyMatcher

use of com.axway.ats.agent.core.templateactions.model.matchers.TextBodyMatcher in project ats-framework by Axway.

the class TemplateLoadClient method checkBodyByContainedText.

/**
 * Verify the body contains the provided text
 *
 * @param actionName the name of the action
 * @param stepNumber the action step number
 * @param searchedText the text to find
 * @param isRegEx should searched text be interpreted as RegEx
 */
@PublicAtsApi
public void checkBodyByContainedText(String actionName, int stepNumber, String searchedText, boolean isRegEx) {
    List<ResponseMatcher> stepMatchers = getStepBodyMatchers(actionName, stepNumber);
    stepMatchers.add(new TextBodyMatcher(searchedText, isRegEx));
}
Also used : ResponseMatcher(com.axway.ats.agent.core.templateactions.model.matchers.ResponseMatcher) TextBodyMatcher(com.axway.ats.agent.core.templateactions.model.matchers.TextBodyMatcher) PublicAtsApi(com.axway.ats.common.PublicAtsApi)

Example 2 with TextBodyMatcher

use of com.axway.ats.agent.core.templateactions.model.matchers.TextBodyMatcher in project ats-framework by Axway.

the class TemplateLoadClient method checkBodyForNotContainedText.

/**
 * Verify the body DOES NOT contain the provided text
 *
 * @param actionName the name of the action
 * @param stepNumber the action step number
 * @param searchedText the text to find
 */
@PublicAtsApi
public void checkBodyForNotContainedText(String actionName, int stepNumber, String searchedText, boolean isRegex) {
    List<ResponseMatcher> stepMatchers = getStepBodyMatchers(actionName, stepNumber);
    stepMatchers.add(new TextBodyMatcher(searchedText, isRegex, true));
}
Also used : ResponseMatcher(com.axway.ats.agent.core.templateactions.model.matchers.ResponseMatcher) TextBodyMatcher(com.axway.ats.agent.core.templateactions.model.matchers.TextBodyMatcher) PublicAtsApi(com.axway.ats.common.PublicAtsApi)

Aggregations

ResponseMatcher (com.axway.ats.agent.core.templateactions.model.matchers.ResponseMatcher)2 TextBodyMatcher (com.axway.ats.agent.core.templateactions.model.matchers.TextBodyMatcher)2 PublicAtsApi (com.axway.ats.common.PublicAtsApi)2