@Test public void testCheckConditionShouldReturnFalseWhenQueryResultFalse() throws SaxonApiException { given(request.getHeader(CONTENT_TYPE_HEADER)).willReturn(HEADER_VAL_XML); parameterList.addParameter(new Parameter(TEXT_PLAIN, HEADER_VAL_XML)); given(xQueryEvaluator.evaluateXQuery(anyString(), anyString())).willReturn("false"); boolean actual = underTest.checkCondition(request, parameterList); assertFalse(actual); }
@Override public boolean checkCondition(final WilmaHttpRequest request, final ParameterList parameterList) { boolean result = false; String contentType = request.getHeader(CONTENT_TYPE_HEADER); if (checkContentTypeIsXml(contentType)) { result = Boolean.valueOf(evaluateQueryWithParamCheck(request, parameterList)); } return result; }
XmlMessageTypeChecker implements ConditionChecker { @Override public boolean checkCondition(final WilmaHttpRequest request, final ParameterList parameterList) { boolean result = false; String contentType = request.getHeader(CONTENT_TYPE_HEADER); if (checkContentTypeIsXml(contentType)) { result = Boolean.valueOf(evaluateQueryWithParamCheck(request, parameterList)); } return result; } }
XmlMessageTypeChecker implements ConditionChecker { @Override public boolean checkCondition(final WilmaHttpRequest request, final ParameterList parameterList) { boolean result = false; String contentType = request.getHeader(CONTENT_TYPE_HEADER); if (checkContentTypeIsXml(contentType)) { result = Boolean.valueOf(evaluateQueryWithParamCheck(request, parameterList)); } return result; }  }
XmlMessageTypeChecker implements ConditionChecker { @Override public boolean checkCondition(final WilmaHttpRequest request, final ParameterList parameterList) { boolean result = false; String contentType = request.getHeader(CONTENT_TYPE_HEADER); if (checkContentTypeIsXml(contentType)) { result = Boolean.valueOf(evaluateQueryWithParamCheck(request, parameterList)); } return result; }  @Override boolean checkCondition(final WilmaHttpRequest request, final ParameterList parameterList); }
XmlMessageTypeChecker implements ConditionChecker { @Override public boolean checkCondition(final WilmaHttpRequest request, final ParameterList parameterList) { boolean result = false; String contentType = request.getHeader(CONTENT_TYPE_HEADER); if (checkContentTypeIsXml(contentType)) { result = Boolean.valueOf(evaluateQueryWithParamCheck(request, parameterList)); } return result; }  @Override boolean checkCondition(final WilmaHttpRequest request, final ParameterList parameterList);  }