use of org.codice.ddf.activities.ActivityEvent in project ddf by codice.
the class ActivityControllerTest method testHandleEventThrowsIllegalArgumentExceptionOnEmptyUserAndSessionId.
/**
* 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 empty.
*/
@Test(expected = IllegalArgumentException.class)
public void testHandleEventThrowsIllegalArgumentExceptionOnEmptyUserAndSessionId() {
testEventProperties.put(ActivityEvent.USER_ID_KEY, "");
testEventProperties.put(ActivityEvent.SESSION_ID_KEY, "");
activityController.handleEvent(new Event(ActivityEvent.EVENT_TOPIC, testEventProperties));
}
use of org.codice.ddf.activities.ActivityEvent in project ddf by codice.
the class ActivityControllerTest method testHandleEventThrowsIllegalArgumentExceptionOnEmptyMessage.
/**
* Test method for {@link ActivityController#handleEvent(org.osgi.service.event.Event)}
*
* Verifies that {@code IllegalArgumentException} is thrown when
* {@code Event}'s {@link ActivityEvent#MESSAGE_KEY} property is
* empty.
*/
@Test(expected = IllegalArgumentException.class)
public void testHandleEventThrowsIllegalArgumentExceptionOnEmptyMessage() {
testEventProperties.put(ActivityEvent.MESSAGE_KEY, "");
activityController.handleEvent(new Event(ActivityEvent.EVENT_TOPIC, testEventProperties));
}
use of org.codice.ddf.activities.ActivityEvent 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.codice.ddf.activities.ActivityEvent 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.codice.ddf.activities.ActivityEvent 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));
}
Aggregations