use of org.osgi.service.event.Event in project ddf by codice.
the class ActivityControllerTest method testHandleEventThrowsIllegalArgumentExceptionOnNullTimestamp.
/**
* Test method for {@link ActivityController#handleEvent(org.osgi.service.event.Event)}
*
* Verifies that {@code IllegalArgumentException} is thrown when
* {@code Event}'s {@link ActivityEvent#TIMESTAMP_KEY} property
* is null.
*/
@Test(expected = IllegalArgumentException.class)
public void testHandleEventThrowsIllegalArgumentExceptionOnNullTimestamp() {
testEventProperties.put(ActivityEvent.TIMESTAMP_KEY, null);
activityController.handleEvent(new Event(ActivityEvent.EVENT_TOPIC, testEventProperties));
}
use of org.osgi.service.event.Event in project ddf by codice.
the class ActivityControllerTest method testHandleEventThrowsIllegalArgumentExceptionOnEmptyApplication.
/**
* Test method for {@link ActivityController#handleEvent(org.osgi.service.event.Event)}
*
* Verifies that {@code IllegalArgumentException} is thrown when
* {@code Event}'s {@link ActivityEvent#ID_KEY}
* property is empty.
*/
@Test(expected = IllegalArgumentException.class)
public void testHandleEventThrowsIllegalArgumentExceptionOnEmptyApplication() {
testEventProperties.put(ActivityEvent.ID_KEY, "");
activityController.handleEvent(new Event(ActivityEvent.EVENT_TOPIC, testEventProperties));
}
use of org.osgi.service.event.Event in project ddf by codice.
the class ActivityControllerTest method testHandleEventThrowsIllegalArgumentExceptionOnNullApplication.
/**
* Test method for {@link ActivityController#handleEvent(org.osgi.service.event.Event)}
*
* Verifies that {@code IllegalArgumentException} is thrown when
* {@code Event}'s {@link ActivityEvent#ID_KEY}
* property is null.
*/
@Test(expected = IllegalArgumentException.class)
public void testHandleEventThrowsIllegalArgumentExceptionOnNullApplication() {
testEventProperties.put(ActivityEvent.ID_KEY, null);
activityController.handleEvent(new Event(ActivityEvent.EVENT_TOPIC, testEventProperties));
}
use of org.osgi.service.event.Event in project ddf by codice.
the class ActivityControllerTest method testHandleEventThrowsIllegalArgumentExceptionOnNullUserAndSessionId.
/**
* Test method for {@link ActivityController#handleEvent(org.osgi.service.event.Event)}
*
* Verifies that {@code IllegalArgumentException} is thrown when
* {@code Event}'s {@link ActivityEvent#USER_ID_KEY} and
* {@link ActivityEvent#SESSION_ID_KEY} properties are null.
*/
@Test(expected = IllegalArgumentException.class)
public void testHandleEventThrowsIllegalArgumentExceptionOnNullUserAndSessionId() {
testEventProperties.put(ActivityEvent.USER_ID_KEY, null);
testEventProperties.put(ActivityEvent.SESSION_ID_KEY, null);
activityController.handleEvent(new Event(ActivityEvent.EVENT_TOPIC, testEventProperties));
}
use of org.osgi.service.event.Event in project ddf by codice.
the class NotificationControllerTest method testHandleEventThrowsIllegalArgumentExceptionOnEmptyApplication.
/**
* Test method for {@link NotificationController#handleEvent(org.osgi.service.event.Event)}
* <p>
* Verifies that {@code IllegalArgumentException} is thrown when {@code Event}'s
* {@link Notification#NOTIFICATION_KEY_APPLICATION} property is empty.
*/
@Test(expected = IllegalArgumentException.class)
public void testHandleEventThrowsIllegalArgumentExceptionOnEmptyApplication() {
testEventProperties.put(Notification.NOTIFICATION_KEY_APPLICATION, "");
notificationController.handleEvent(new Event(Notification.NOTIFICATION_TOPIC_BROADCAST, testEventProperties));
}
Aggregations