This commit is contained in:
James 2017-09-18 06:22:26 -04:00
parent feb9852a25
commit 95da0b7fef
1 changed files with 2 additions and 3 deletions

View File

@ -169,8 +169,7 @@ public class LoggingInterceptorDstu2Test {
ArgumentCaptor<String> captor = ArgumentCaptor.forClass(String.class); ArgumentCaptor<String> captor = ArgumentCaptor.forClass(String.class);
verify(logger, timeout(1000).times(1)).info(captor.capture()); verify(logger, timeout(1000).times(1)).info(captor.capture());
assertThat(captor.getValue(), startsWith("read - ")); assertThat(captor.getValue(), startsWith("read - "));
int millis = Integer.parseInt(captor.getValue().substring("read - ".length())); Integer.parseInt(captor.getValue().substring("read - ".length()));
assertThat(millis, greaterThan(0));
} }
@Test @Test
@ -193,7 +192,7 @@ public class LoggingInterceptorDstu2Test {
ArgumentCaptor<String> captor = ArgumentCaptor.forClass(String.class); ArgumentCaptor<String> captor = ArgumentCaptor.forClass(String.class);
verify(logger, timeout(1000).times(1)).info(captor.capture()); verify(logger, timeout(1000).times(1)).info(captor.capture());
assertThat(captor.getValue(), matchesPattern("[0-9]{3}")); assertThat(captor.getValue(), matchesPattern("[1-9][0-9]{2}"));
} }
@Test @Test