/** * Create an instance of {@link BusinessObjectDataNotificationEventParamsDto } * */ public BusinessObjectDataNotificationEventParamsDto createBusinessObjectDataNotificationEventParamsDto() { return new BusinessObjectDataNotificationEventParamsDto(); }
public Object createNewInstance() { return new BusinessObjectDataNotificationEventParamsDto(); }
@Override public BusinessObjectDataNotificationEventParamsDto build() { if (_storedValue == null) { return this.init(new BusinessObjectDataNotificationEventParamsDto()); } else { return ((BusinessObjectDataNotificationEventParamsDto) _storedValue); } }
BusinessObjectDataNotificationEventParamsDto notificationEventParams = new BusinessObjectDataNotificationEventParamsDto(); notificationEventParams.setBusinessObjectDataNotificationRegistration(businessObjectDataNotificationRegistration); notificationEventParams.setNotificationJobAction(notificationJobActionEntity);
BusinessObjectDataNotificationEventParamsDto notificationEventParams = new BusinessObjectDataNotificationEventParamsDto(); notificationEventParams.setBusinessObjectDataNotificationRegistration(businessObjectDataNotificationRegistration); notificationEventParams.setNotificationJobAction(notificationJobActionEntity);
@Test public void testPerformNotificationActionInvalidParamsDto() throws Exception { // Get the notification action service for the storage unit status change event. NotificationActionService notificationActionService = notificationActionFactory .getNotificationActionHandler(NotificationTypeEntity.NOTIFICATION_TYPE_STORAGE_UNIT, NotificationEventTypeEntity.EventTypesStorageUnit.STRGE_UNIT_STTS_CHG.name()); // Try to perform a notification action for the storage unit status change event with an invalid type of the parameters DTO. try { notificationActionService.performNotificationAction(new BusinessObjectDataNotificationEventParamsDto()); fail(); } catch (IllegalStateException e) { assertEquals("Notification event parameters DTO passed to the method must be an instance of StorageUnitNotificationEventParamsDto.", e.getMessage()); } } }
@Test public void testGetIdentifyingInformationInvalidParamsDto() { // Get the notification action service for the storage unit status change event. NotificationActionService notificationActionService = notificationActionFactory .getNotificationActionHandler(NotificationTypeEntity.NOTIFICATION_TYPE_STORAGE_UNIT, NotificationEventTypeEntity.EventTypesStorageUnit.STRGE_UNIT_STTS_CHG.name()); // Try to retrieve the identifying information for the notification event using an invalid type of the parameters DTO. try { notificationActionService.getIdentifyingInformation(new BusinessObjectDataNotificationEventParamsDto(), businessObjectDataHelper); fail(); } catch (IllegalStateException e) { assertEquals("Notification event parameters DTO passed to the method must be an instance of StorageUnitNotificationEventParamsDto.", e.getMessage()); } }
BusinessObjectDataNotificationEventParamsDto businessObjectDataNotificationEventParams = new BusinessObjectDataNotificationEventParamsDto(); businessObjectDataNotificationEventParams.setBusinessObjectData(businessObjectDataHelper.createBusinessObjectDataFromEntity(businessObjectDataEntity)); businessObjectDataNotificationEventParams.setBusinessObjectDataNotificationRegistration(businessObjectDataNotificationRegistrationEntity);