@Test public void matchesCompositionOfExpressionsWithEnd() { Condition condition = condition( "header('Host') == 'bbc.co.uk' AND header('Content-Length') == '7' AND header('App-Name')=='app1'"); LiveHttpRequest request = newRequest() .header(HOST, "bbc.co.uk") .header(CONTENT_LENGTH, "7") .header("App-Name", "app1") .build(); assertThat(condition.evaluate(request, context), is(true)); }
@Override public boolean evaluate(LiveHttpRequest request, HttpInterceptor.Context context) { return expression.evaluate(request, context); }
AntlrCondition implements Condition { @Override public boolean evaluate(LiveHttpRequest request, HttpInterceptor.Context context) { return expression.evaluate(request, context); } }
AntlrCondition implements Condition { @Override public boolean evaluate(LiveHttpRequest request, HttpInterceptor.Context context) { return expression.evaluate(request, context); } AntlrCondition(Expression<Boolean> expression); }
AntlrCondition implements Condition { @Override public boolean evaluate(LiveHttpRequest request, HttpInterceptor.Context context) { return expression.evaluate(request, context); } AntlrCondition(Expression<Boolean> expression); @Override boolean evaluate(LiveHttpRequest request, HttpInterceptor.Context context); }
AntlrCondition implements Condition { @Override public boolean evaluate(LiveHttpRequest request, HttpInterceptor.Context context) { return expression.evaluate(request, context); } AntlrCondition(Expression<Boolean> expression); @Override boolean evaluate(LiveHttpRequest request, HttpInterceptor.Context context);  }