add tests for repository entity events

Signed-off-by: Michael Hirsch <michael.hirsch@bosch-si.com>
This commit is contained in:
Michael Hirsch
2016-08-01 15:14:40 +02:00
parent 4e237f748b
commit 9c442967f8
6 changed files with 237 additions and 67 deletions

View File

@@ -11,27 +11,26 @@ package org.eclipse.hawkbit.repository.eventbus.event;
import org.eclipse.hawkbit.eventbus.event.AbstractDistributedEvent;
import org.eclipse.hawkbit.repository.model.DistributionSet;
/**
* * Defines the {@link AbstractDistributedEvent} for deletion of {@link DistributionSet}.
*
* Defines the {@link AbstractDistributedEvent} for deletion of
* {@link DistributionSet}.
*/
public class DistributionDeletedEvent extends AbstractDistributedEvent{
private static final long serialVersionUID = -3308850381757843098L;
final Long[] distributionSetIDs;
public class DistributionDeletedEvent extends AbstractDistributedEvent {
private static final long serialVersionUID = -3308850381757843098L;
private final Long distributionId;
/**
* @param tenant
* the tenant for this event
* @param distributionSetId
* the ID of the target which has been deleted
* the ID of the distribution set which has been deleted
*/
public DistributionDeletedEvent(final String tenant, final Long...distributionIds) {
public DistributionDeletedEvent(final String tenant, final Long distributionId) {
super(-1, tenant);
this.distributionSetIDs = distributionIds;
this.distributionId = distributionId;
}
public Long[] getDistributionSetIDs() {
return distributionSetIDs;
}
public Long getDistributionSetId() {
return distributionId;
}
}