@Test public void testCheckConditionWhenParameterMapHasEmptyEntryShouldReturnFalse() { parameterList.addParameter(new Parameter(PARAMETER_NAME, "")); given(request.getBody()).willReturn(MSG_ID); boolean actual = underTest.checkCondition(request, parameterList); assertEquals(actual, false); }
@Override public boolean checkCondition(final WilmaHttpRequest request, final ParameterList parameterList) { List<Parameter> params = parameterList.getAllParameters(); Iterator<Parameter> iterator = params.iterator(); boolean result = !params.isEmpty(); while (iterator.hasNext() && result) { Parameter parameter = iterator.next(); String parameterValue = parameter.getValue(); result = evaluateParameter(request, parameterValue); } return result; }
AndBodyChecker implements ConditionChecker { @Override public boolean checkCondition(final WilmaHttpRequest request, final ParameterList parameterList) { List<Parameter> params = parameterList.getAllParameters(); Iterator<Parameter> iterator = params.iterator(); boolean result = !params.isEmpty(); while (iterator.hasNext() && result) { Parameter parameter = iterator.next(); String parameterValue = parameter.getValue(); result = evaluateParameter(request, parameterValue); } return result; } }
AndBodyChecker implements ConditionChecker { @Override public boolean checkCondition(final WilmaHttpRequest request, final ParameterList parameterList) { List<Parameter> params = parameterList.getAllParameters(); Iterator<Parameter> iterator = params.iterator(); boolean result = !params.isEmpty(); while (iterator.hasNext() && result) { Parameter parameter = iterator.next(); String parameterValue = parameter.getValue(); result = evaluateParameter(request, parameterValue); } return result; } AndBodyChecker(final ConditionCheckerOperator operator); }
AndBodyChecker implements ConditionChecker { @Override public boolean checkCondition(final WilmaHttpRequest request, final ParameterList parameterList) { List<Parameter> params = parameterList.getAllParameters(); Iterator<Parameter> iterator = params.iterator(); boolean result = !params.isEmpty(); while (iterator.hasNext() && result) { Parameter parameter = iterator.next(); String parameterValue = parameter.getValue(); result = evaluateParameter(request, parameterValue); } return result; } AndBodyChecker(final ConditionCheckerOperator operator); @Override boolean checkCondition(final WilmaHttpRequest request, final ParameterList parameterList); }
AndBodyChecker implements ConditionChecker { @Override public boolean checkCondition(final WilmaHttpRequest request, final ParameterList parameterList) { List<Parameter> params = parameterList.getAllParameters(); Iterator<Parameter> iterator = params.iterator(); boolean result = !params.isEmpty(); while (iterator.hasNext() && result) { Parameter parameter = iterator.next(); String parameterValue = parameter.getValue(); result = evaluateParameter(request, parameterValue); } return result; } AndBodyChecker(final ConditionCheckerOperator operator); @Override boolean checkCondition(final WilmaHttpRequest request, final ParameterList parameterList);  }