@Test void testDefaultDateFormat() { final ExchangeAttribute attribute = new DateTimeAttribute.Builder().build(DateTimeAttribute.DATE_TIME_SHORT); final String value = attribute.readAttribute(null); Assertions.assertNotNull(value, DateTimeAttribute.DATE_TIME_SHORT + " attribute returned null"); Assertions.assertFalse(value.trim().isEmpty(), DateTimeAttribute.DATE_TIME_SHORT + " attribute returned empty value"); }
@Override public String readAttribute(final RoutingContext exchange) { return formatter.format(ZonedDateTime.now()); }
DateTimeAttribute implements ExchangeAttribute { @Override public String readAttribute(final RoutingContext exchange) { return formatter.format(ZonedDateTime.now()); } }
DateTimeAttribute implements ExchangeAttribute { @Override public String readAttribute(final RoutingContext exchange) { return formatter.format(ZonedDateTime.now()); } private  DateTimeAttribute();  DateTimeAttribute(final String dateFormat);  DateTimeAttribute(final String dateFormat, final String timezone); }
DateTimeAttribute implements ExchangeAttribute { @Override public String readAttribute(final RoutingContext exchange) { return formatter.format(ZonedDateTime.now()); } private  DateTimeAttribute();  DateTimeAttribute(final String dateFormat);  DateTimeAttribute(final String dateFormat, final String timezone); @Override String readAttribute(final RoutingContext exchange); @Override void writeAttribute(final RoutingContext exchange, final String newValue); }
DateTimeAttribute implements ExchangeAttribute { @Override public String readAttribute(final RoutingContext exchange) { return formatter.format(ZonedDateTime.now()); } private  DateTimeAttribute();  DateTimeAttribute(final String dateFormat);  DateTimeAttribute(final String dateFormat, final String timezone); @Override String readAttribute(final RoutingContext exchange); @Override void writeAttribute(final RoutingContext exchange, final String newValue); static final String DATE_TIME_SHORT; static final String DATE_TIME; static final String CUSTOM_TIME; static final ExchangeAttribute INSTANCE; }