LogMessageRegex { public static Pattern getPattern() { return Pattern.compile(REGEX); }  static String getRegex(); static Pattern getPattern();  }
@Test public void patternMatcherMatchesLogLine() { Matcher matcher = getPattern().matcher(logLine); assertThat(matcher.matches()).isTrue(); }
@Test public void patternMatcherGroupZeroMatchesLogLine() { Matcher matcher = getPattern().matcher(logLine); assertThat(matcher.matches()).isTrue(); assertThat(matcher.group(0)).isEqualTo(logLine); }
@Test public void patternMatcherGroupCountEqualsGroupsLength() { Matcher matcher = getPattern().matcher(logLine); assertThat(matcher.matches()).isTrue(); assertThat(matcher.groupCount()).isEqualTo(values().length); }
@Test public void logLevelGroupIndexCapturesLogLevel() { Matcher matcher = getPattern().matcher(logLine); assertThat(matcher.matches()).isTrue(); assertThat(matcher.group(LOG_LEVEL.getIndex())).isEqualTo(logLevel); }
@Test public void dateGroupIndexCapturesDate() { Matcher matcher = getPattern().matcher(logLine); assertThat(matcher.matches()).isTrue(); assertThat(matcher.group(DATE.getIndex())).isEqualTo(date); }
@Test public void timeGroupIndexCapturesTime() { Matcher matcher = getPattern().matcher(logLine); assertThat(matcher.matches()).isTrue(); assertThat(matcher.group(TIME.getIndex())).isEqualTo(time); }
@Test public void timeZoneGroupIndexCapturesTimeZone() { Matcher matcher = getPattern().matcher(logLine); assertThat(matcher.matches()).isTrue(); assertThat(matcher.group(TIME_ZONE.getIndex())).isEqualTo(timeZone); }
@Test public void logLevelGroupNameCapturesLogLevel() { Matcher matcher = getPattern().matcher(logLine); assertThat(matcher.matches()).isTrue(); assertThat(matcher.group(LOG_LEVEL.getName())).isEqualTo(logLevel); }
@Test public void dateGroupNameCapturesDate() { Matcher matcher = getPattern().matcher(logLine); assertThat(matcher.matches()).isTrue(); assertThat(matcher.group(DATE.getName())).isEqualTo(date); }
@Test public void timeGroupNameCapturesTime() { Matcher matcher = getPattern().matcher(logLine); assertThat(matcher.matches()).isTrue(); assertThat(matcher.group(TIME.getName())).isEqualTo(time); }
@Test public void timeZoneGroupNameCapturesTimeZone() { Matcher matcher = getPattern().matcher(logLine); assertThat(matcher.matches()).isTrue(); assertThat(matcher.group(TIME_ZONE.getName())).isEqualTo(timeZone); }
@Test public void memberNameGroupNameCapturesMemberName() { Matcher matcher = getPattern().matcher(logLine); assertThat(matcher.matches()).isTrue(); assertThat(matcher.group(MEMBER_NAME.getName())).isEqualTo(memberName); }
@Test public void threadNameGroupNameCapturesThreadName() { Matcher matcher = getPattern().matcher(logLine); assertThat(matcher.matches()).isTrue(); assertThat(matcher.group(THREAD_NAME.getName())).isEqualTo(threadName); }
@Test public void threadIdGroupNameCapturesThreadId() { Matcher matcher = getPattern().matcher(logLine); assertThat(matcher.matches()).isTrue(); assertThat(matcher.group(THREAD_ID.getName())).isEqualTo(threadId); }
@Test public void messageGroupNameCapturesMessage() { Matcher matcher = getPattern().matcher(logLine); assertThat(matcher.matches()).isTrue(); assertThat(matcher.group(MESSAGE.getName())).isEqualTo(message); }