コード例 #1
0
  private void removeUserFromGroups_VerifyLogEntries() {
    List<AuditLogEntry> logEntries = AuditLogData.get();
    assertEquals(2, logEntries.size());
    BESAuditLogEntry logEntry1 = (BESAuditLogEntry) AuditLogData.get().get(0);
    Map<AuditLogParameter, String> logParams1 = logEntry1.getLogParameters();
    assertEquals(GROUPNAME_1, logParams1.get(AuditLogParameter.GROUP));
    assertEquals(USERID_1, logParams1.get(AuditLogParameter.USER));

    BESAuditLogEntry logEntry = (BESAuditLogEntry) AuditLogData.get().get(1);
    Map<AuditLogParameter, String> logParams2 = logEntry.getLogParameters();
    assertEquals(GROUPNAME_2, logParams2.get(AuditLogParameter.GROUP));
    assertEquals(USERID_1, logParams2.get(AuditLogParameter.USER));
  }
コード例 #2
0
 private void assignUsersToGroup_VerifyLogEntries() {
   List<AuditLogEntry> logEntries = AuditLogData.get();
   assertEquals(1, logEntries.size());
   BESAuditLogEntry logEntry1 = (BESAuditLogEntry) AuditLogData.get().get(0);
   Map<AuditLogParameter, String> logParams1 = logEntry1.getLogParameters();
   assertEquals(GROUPNAME_1, logParams1.get(AuditLogParameter.GROUP));
   assertEquals(USERID_1 + "," + USERID_2, logParams1.get(AuditLogParameter.USER));
 }
コード例 #3
0
 private void verifyLogEntriesForAssignCategories() {
   List<AuditLogEntry> logEntries = AuditLogData.get();
   assertEquals(1, logEntries.size());
   BESAuditLogEntry logEntry = (BESAuditLogEntry) AuditLogData.get().get(0);
   Map<AuditLogParameter, String> logParams = logEntry.getLogParameters();
   assertEquals(String.valueOf(SERVICE_NAME), logParams.get(AuditLogParameter.SERVICE_ID));
   assertEquals(LOCALIZED_RESOURCE, logParams.get(AuditLogParameter.SERVICE_NAME));
   assertEquals(CATEGORIES_ID, logParams.get(AuditLogParameter.CATEGORIES_ID));
 }
  private void verifyLogEntries() {

    List<AuditLogEntry> logEntries = AuditLogData.get();
    assertEquals(2, logEntries.size());
    BESAuditLogEntry logEntry1 = (BESAuditLogEntry) AuditLogData.get().get(0);
    BESAuditLogEntry logEntry2 = (BESAuditLogEntry) AuditLogData.get().get(1);
    Map<AuditLogParameter, String> logParams1 = logEntry1.getLogParameters();
    Map<AuditLogParameter, String> logParams2 = logEntry2.getLogParameters();
    assertEquals(PRODUCT_ID, logParams1.get(AuditLogParameter.SERVICE_ID));
    assertEquals(LOCALIZED_RESOURCE, logParams1.get(AuditLogParameter.SERVICE_NAME));

    assertEquals(LOCALE_EN, logParams1.get(AuditLogParameter.LOCALE));
    assertEquals("YES", logParams1.get(AuditLogParameter.DESCRIPTION));
    assertEquals("YES", logParams1.get(AuditLogParameter.SHORT_DESCRIPTION));

    assertEquals(LOCALE_JA, logParams2.get(AuditLogParameter.LOCALE));
    assertEquals("YES", logParams2.get(AuditLogParameter.DESCRIPTION));
    assertEquals("YES", logParams2.get(AuditLogParameter.SHORT_DESCRIPTION));
  }
コード例 #5
0
 private void verifyLogEntriesForSetPublicService() {
   List<AuditLogEntry> logEntries = AuditLogData.get();
   assertEquals(1, logEntries.size());
   BESAuditLogEntry logEntry = (BESAuditLogEntry) AuditLogData.get().get(0);
   Map<AuditLogParameter, String> logParams = logEntry.getLogParameters();
   assertEquals(String.valueOf(SERVICE_NAME), logParams.get(AuditLogParameter.SERVICE_ID));
   assertEquals(LOCALIZED_RESOURCE, logParams.get(AuditLogParameter.SERVICE_NAME));
   assertEquals(
       Boolean.valueOf(SERVICE_PUBLIC).toString(),
       logParams.get(AuditLogParameter.SERVICE_PUBLIC));
 }
コード例 #6
0
 private void accessToServices_VerifyLogEntries(UserGroupAuditLogOperation operation) {
   List<AuditLogEntry> logEntries = AuditLogData.get();
   assertEquals(2, logEntries.size());
   BESAuditLogEntry logEntry1 = (BESAuditLogEntry) AuditLogData.get().get(0);
   assertEquals(operation.name().toString(), logEntry1.getOperationName());
   Map<AuditLogParameter, String> logParams1 = logEntry1.getLogParameters();
   assertEquals(GROUPNAME_1, logParams1.get(AuditLogParameter.GROUP));
   assertEquals(MARKETPLACEID, logParams1.get(AuditLogParameter.MARKETPLACE_ID));
   assertEquals(PARAMETERNAME, logParams1.get(AuditLogParameter.MARKETPLACE_NAME));
   assertEquals(PRODUCTID_1, logParams1.get(AuditLogParameter.SERVICE_ID));
   assertEquals(PARAMETERNAME, logParams1.get(AuditLogParameter.SERVICE_NAME));
   assertEquals(VENDORID_1, logParams1.get(AuditLogParameter.SELLER_ID));
 }