@Test public void testCheckConditionShouldCallHeaderAndBodyPatternCheckersAndReturnWithTrueWhenPatternNotInBody() { given(headerChecker.checkCondition(request, parameterMap)).willReturn(true); given(bodyChecker.checkCondition(request, parameterMap)).willReturn(false); given(urlChecker.checkCondition(request, parameterMap)).willReturn(false); boolean actual = underTest.checkCondition(request, parameterMap); assertTrue(actual); }
@Override public boolean checkCondition(final WilmaHttpRequest request, final ParameterList parameterMap) { return headerChecker.checkCondition(request, parameterMap) || bodyChecker.checkCondition(request, parameterMap) || urlChecker.checkCondition(request, parameterMap); }
OrGeneralChecker implements ConditionChecker { @Override public boolean checkCondition(final WilmaHttpRequest request, final ParameterList parameterMap) { return headerChecker.checkCondition(request, parameterMap) || bodyChecker.checkCondition(request, parameterMap) || urlChecker.checkCondition(request, parameterMap); } }
OrGeneralChecker implements ConditionChecker { @Override public boolean checkCondition(final WilmaHttpRequest request, final ParameterList parameterMap) { return headerChecker.checkCondition(request, parameterMap) || bodyChecker.checkCondition(request, parameterMap) || urlChecker.checkCondition(request, parameterMap); } OrGeneralChecker(final ConditionChecker headerChecker, final ConditionChecker bodyChecker, final ConditionChecker urlChecker); }
OrGeneralChecker implements ConditionChecker { @Override public boolean checkCondition(final WilmaHttpRequest request, final ParameterList parameterMap) { return headerChecker.checkCondition(request, parameterMap) || bodyChecker.checkCondition(request, parameterMap) || urlChecker.checkCondition(request, parameterMap); } OrGeneralChecker(final ConditionChecker headerChecker, final ConditionChecker bodyChecker, final ConditionChecker urlChecker); @Override boolean checkCondition(final WilmaHttpRequest request, final ParameterList parameterMap); }
OrGeneralChecker implements ConditionChecker { @Override public boolean checkCondition(final WilmaHttpRequest request, final ParameterList parameterMap) { return headerChecker.checkCondition(request, parameterMap) || bodyChecker.checkCondition(request, parameterMap) || urlChecker.checkCondition(request, parameterMap); } OrGeneralChecker(final ConditionChecker headerChecker, final ConditionChecker bodyChecker, final ConditionChecker urlChecker); @Override boolean checkCondition(final WilmaHttpRequest request, final ParameterList parameterMap);  }