TimestampInequalityRule extends AbstractRule { public static Rule getRule(final String inequalitySymbol, final String value) { return new TimestampInequalityRule(inequalitySymbol, value); } private  TimestampInequalityRule(final String inequalitySymbol, final String value); static Rule getRule(final String inequalitySymbol, final String value); @SuppressWarnings({"rawtypes", "unchecked"}) boolean evaluate(final LogData event, Map matches); static final SimpleDateFormat[] DATE_FORMATS; static final SimpleDateFormat[] TIME_FORMATS; }
@Test public void testFail1() { try { TimestampInequalityRule.getRule(">", "now"); Assert.fail("Expected IllegalArgumentException"); } catch (IllegalArgumentException ignored) { } }
@Test public void testFail2() { try { TimestampInequalityRule.getRule(">", "2008/May/20"); Assert.fail("Expected IllegalArgumentException"); } catch (IllegalArgumentException ignored) { } }
@Test public void test2() { TimestampInequalityRule.getRule("~", "2008-05-21 00:45:46"); }