use of org.opennms.test.ThrowableAnticipator in project opennms by OpenNMS.
the class EventIpcManagerDefaultImplTest method testAddEventListenerTwoArgumentListNullListener.
public void testAddEventListenerTwoArgumentListNullListener() throws Exception {
ThrowableAnticipator ta = new ThrowableAnticipator();
ta.anticipate(new IllegalArgumentException("listener argument cannot be null"));
try {
m_manager.addEventListener((EventListener) null, new ArrayList<String>(0));
} catch (Throwable t) {
ta.throwableReceived(t);
}
ta.verifyAnticipated();
}
use of org.opennms.test.ThrowableAnticipator in project opennms by OpenNMS.
the class EventIpcManagerDefaultImplTest method testRemoveEventListenerTwoArgumentStringNullUeiList.
public void testRemoveEventListenerTwoArgumentStringNullUeiList() throws Exception {
ThrowableAnticipator ta = new ThrowableAnticipator();
ta.anticipate(new IllegalArgumentException("uei argument cannot be null"));
try {
m_manager.removeEventListener(m_listener, (String) null);
} catch (Throwable t) {
ta.throwableReceived(t);
}
ta.verifyAnticipated();
}
use of org.opennms.test.ThrowableAnticipator in project opennms by OpenNMS.
the class EventIpcManagerDefaultImplTest method testRemoveEventListenerTwoArgumentStringNullListener.
public void testRemoveEventListenerTwoArgumentStringNullListener() throws Exception {
ThrowableAnticipator ta = new ThrowableAnticipator();
ta.anticipate(new IllegalArgumentException("listener argument cannot be null"));
try {
m_manager.removeEventListener((EventListener) null, "");
} catch (Throwable t) {
ta.throwableReceived(t);
}
ta.verifyAnticipated();
}
use of org.opennms.test.ThrowableAnticipator in project opennms by OpenNMS.
the class EventIpcManagerDefaultImplTest method testRemoveEventListenerNullListener.
public void testRemoveEventListenerNullListener() throws Exception {
ThrowableAnticipator ta = new ThrowableAnticipator();
ta.anticipate(new IllegalArgumentException("listener argument cannot be null"));
try {
m_manager.removeEventListener((EventListener) null);
} catch (Throwable t) {
ta.throwableReceived(t);
}
ta.verifyAnticipated();
}
use of org.opennms.test.ThrowableAnticipator in project opennms by OpenNMS.
the class EventIpcManagerDefaultImplTest method testSendNowNullEventLog.
public void testSendNowNullEventLog() throws Exception {
ThrowableAnticipator ta = new ThrowableAnticipator();
ta.anticipate(new IllegalArgumentException("eventLog argument cannot be null"));
try {
m_manager.sendNow((Log) null);
} catch (Throwable t) {
ta.throwableReceived(t);
}
ta.verifyAnticipated();
}
Aggregations