Search in sources :

Example 16 with StorageUnitNotificationRegistrationKeys

use of org.finra.herd.model.api.xml.StorageUnitNotificationRegistrationKeys in project herd by FINRAOS.

the class StorageUnitNotificationRegistrationServiceTest method testGetStorageUnitNotificationRegistrationsByNamespace.

@Test
public void testGetStorageUnitNotificationRegistrationsByNamespace() {
    // Create and persist storage unit notification entities.
    for (NotificationRegistrationKey notificationRegistrationKey : notificationRegistrationDaoTestHelper.getTestNotificationRegistrationKeys()) {
        notificationRegistrationDaoTestHelper.createStorageUnitNotificationRegistrationEntity(notificationRegistrationKey, NotificationEventTypeEntity.EventTypesStorageUnit.STRGE_UNIT_STTS_CHG.name(), BDEF_NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, null, STORAGE_NAME, null, null, notificationRegistrationDaoTestHelper.getTestJobActions(), NotificationRegistrationStatusEntity.ENABLED);
    }
    // Retrieve a list of storage unit notification registration keys.
    StorageUnitNotificationRegistrationKeys resultKeys = storageUnitNotificationRegistrationService.getStorageUnitNotificationRegistrationsByNamespace(NAMESPACE);
    // Validate the returned object.
    assertEquals(notificationRegistrationDaoTestHelper.getExpectedNotificationRegistrationKeys(), resultKeys.getStorageUnitNotificationRegistrationKeys());
}
Also used : StorageUnitNotificationRegistrationKeys(org.finra.herd.model.api.xml.StorageUnitNotificationRegistrationKeys) NotificationRegistrationKey(org.finra.herd.model.api.xml.NotificationRegistrationKey) Test(org.junit.Test)

Aggregations

StorageUnitNotificationRegistrationKeys (org.finra.herd.model.api.xml.StorageUnitNotificationRegistrationKeys)16 Test (org.junit.Test)14 NotificationRegistrationKey (org.finra.herd.model.api.xml.NotificationRegistrationKey)13 StorageUnitNotificationFilter (org.finra.herd.model.api.xml.StorageUnitNotificationFilter)8 ArrayList (java.util.ArrayList)2 NamespacePermission (org.finra.herd.model.annotation.NamespacePermission)1