@Test public void testCheckConditionShouldReturnTrueWhenParameterListContainsMoreElement() { paramList.addParameter(new Parameter("key1", "aba")); paramList.addParameter(new Parameter("key2", "ba")); paramList.addParameter(new Parameter("key3", "a")); given(request.getRequestLine()).willReturn("aba"); boolean result = underTest.checkCondition(request, paramList); Assert.assertTrue(result); }
@Override public boolean checkCondition(final WilmaHttpRequest request, final ParameterList parameters) { List<Parameter> params = parameters.getAllParameters(); Iterator<Parameter> iterator = params.iterator(); boolean result = !params.isEmpty(); while (iterator.hasNext() && result) { Parameter parameter = iterator.next(); result = evaluateParameter(request, parameter); } return result; }
AndUrlPatternChecker implements ConditionChecker { @Override public boolean checkCondition(final WilmaHttpRequest request, final ParameterList parameters) { List<Parameter> params = parameters.getAllParameters(); Iterator<Parameter> iterator = params.iterator(); boolean result = !params.isEmpty(); while (iterator.hasNext() && result) { Parameter parameter = iterator.next(); result = evaluateParameter(request, parameter); } return result; } }
AndUrlPatternChecker implements ConditionChecker { @Override public boolean checkCondition(final WilmaHttpRequest request, final ParameterList parameters) { List<Parameter> params = parameters.getAllParameters(); Iterator<Parameter> iterator = params.iterator(); boolean result = !params.isEmpty(); while (iterator.hasNext() && result) { Parameter parameter = iterator.next(); result = evaluateParameter(request, parameter); } return result; }  }
AndUrlPatternChecker implements ConditionChecker { @Override public boolean checkCondition(final WilmaHttpRequest request, final ParameterList parameters) { List<Parameter> params = parameters.getAllParameters(); Iterator<Parameter> iterator = params.iterator(); boolean result = !params.isEmpty(); while (iterator.hasNext() && result) { Parameter parameter = iterator.next(); result = evaluateParameter(request, parameter); } return result; }  @Override boolean checkCondition(final WilmaHttpRequest request, final ParameterList parameters); }
AndUrlPatternChecker implements ConditionChecker { @Override public boolean checkCondition(final WilmaHttpRequest request, final ParameterList parameters) { List<Parameter> params = parameters.getAllParameters(); Iterator<Parameter> iterator = params.iterator(); boolean result = !params.isEmpty(); while (iterator.hasNext() && result) { Parameter parameter = iterator.next(); result = evaluateParameter(request, parameter); } return result; }  @Override boolean checkCondition(final WilmaHttpRequest request, final ParameterList parameters);  }