コード例 #1
0
 @Test
 public void failureIsLoggedIfAceRequiresFailureAudit() throws Exception {
   when(ace.isAuditFailure()).thenReturn(true);
   logger.logIfNeeded(false, ace);
   assertThat(bytes.toString().startsWith("DENIED due to ACE")).isTrue();
 }
コード例 #2
0
 @Test
 public void failureIsntLoggedIfAceDoesntRequireFailureAudit() throws Exception {
   when(ace.isAuditFailure()).thenReturn(false);
   logger.logIfNeeded(false, ace);
   assertThat(bytes.size()).isEqualTo(0);
 }