@Test void parseDateTimeShouldReturnNowWhenNotADate() throws Exception { ImapRequestStreamLineReader request = toRequest("any\n"); assertThat(testee.parseDateTime(request).toInstant(ZoneOffset.UTC)).isEqualTo(DATE); }
@VisibleForTesting LocalDateTime parseDateTime(ImapRequestLineReader request) throws DecodingException { char next = request.nextWordChar(); if (next == '"') { return request.dateTime(); } return LocalDateTime.now(clock); }
AppendCommandParser extends AbstractImapCommandParser { @VisibleForTesting LocalDateTime parseDateTime(ImapRequestLineReader request) throws DecodingException { char next = request.nextWordChar(); if (next == '"') { return request.dateTime(); } return LocalDateTime.now(clock); } }
AppendCommandParser extends AbstractImapCommandParser { @VisibleForTesting LocalDateTime parseDateTime(ImapRequestLineReader request) throws DecodingException { char next = request.nextWordChar(); if (next == '"') { return request.dateTime(); } return LocalDateTime.now(clock); } AppendCommandParser(StatusResponseFactory statusResponseFactory, Clock clock); }
AppendCommandParser extends AbstractImapCommandParser { @VisibleForTesting LocalDateTime parseDateTime(ImapRequestLineReader request) throws DecodingException { char next = request.nextWordChar(); if (next == '"') { return request.dateTime(); } return LocalDateTime.now(clock); } AppendCommandParser(StatusResponseFactory statusResponseFactory, Clock clock);  }
AppendCommandParser extends AbstractImapCommandParser { @VisibleForTesting LocalDateTime parseDateTime(ImapRequestLineReader request) throws DecodingException { char next = request.nextWordChar(); if (next == '"') { return request.dateTime(); } return LocalDateTime.now(clock); } AppendCommandParser(StatusResponseFactory statusResponseFactory, Clock clock);   }