@Test public void testCheckConditionShouldReturnFalseWhenBodyDoesNotContainParam() { given(request.getBody()).willReturn("b"); given(paramList.getAllParameters()).willReturn(params); params.add(new Parameter("", "aa")); boolean actual = underTest.checkCondition(request, paramList); assertFalse(actual); }
@Override public boolean checkCondition(final WilmaHttpRequest request, final ParameterList parameterList) { List<Parameter> params = parameterList.getAllParameters(); Iterator<Parameter> iterator = params.iterator(); boolean result = false; if (!params.isEmpty()) { while (iterator.hasNext() && !result) { result = checkInRequestHeaders(request, iterator.next()); } } return result; }
OrBodyChecker implements ConditionChecker { @Override public boolean checkCondition(final WilmaHttpRequest request, final ParameterList parameterList) { List<Parameter> params = parameterList.getAllParameters(); Iterator<Parameter> iterator = params.iterator(); boolean result = false; if (!params.isEmpty()) { while (iterator.hasNext() && !result) { result = checkInRequestHeaders(request, iterator.next()); } } return result; } }
OrBodyChecker implements ConditionChecker { @Override public boolean checkCondition(final WilmaHttpRequest request, final ParameterList parameterList) { List<Parameter> params = parameterList.getAllParameters(); Iterator<Parameter> iterator = params.iterator(); boolean result = false; if (!params.isEmpty()) { while (iterator.hasNext() && !result) { result = checkInRequestHeaders(request, iterator.next()); } } return result; } OrBodyChecker(final ConditionCheckerOperator operator); }
OrBodyChecker implements ConditionChecker { @Override public boolean checkCondition(final WilmaHttpRequest request, final ParameterList parameterList) { List<Parameter> params = parameterList.getAllParameters(); Iterator<Parameter> iterator = params.iterator(); boolean result = false; if (!params.isEmpty()) { while (iterator.hasNext() && !result) { result = checkInRequestHeaders(request, iterator.next()); } } return result; } OrBodyChecker(final ConditionCheckerOperator operator); @Override boolean checkCondition(final WilmaHttpRequest request, final ParameterList parameterList); }
OrBodyChecker implements ConditionChecker { @Override public boolean checkCondition(final WilmaHttpRequest request, final ParameterList parameterList) { List<Parameter> params = parameterList.getAllParameters(); Iterator<Parameter> iterator = params.iterator(); boolean result = false; if (!params.isEmpty()) { while (iterator.hasNext() && !result) { result = checkInRequestHeaders(request, iterator.next()); } } return result; } OrBodyChecker(final ConditionCheckerOperator operator); @Override boolean checkCondition(final WilmaHttpRequest request, final ParameterList parameterList);  }