use of com.serotonin.m2m2.vo.mailingList.MailingListRecipient in project ma-core-public by MangoAutomation.
the class EmailHandlerRTTest method testSendActive.
@Test
public void testSendActive() {
EmailEventHandlerVO vo = createVO();
List<MailingListRecipient> activeRecipients = createRecipients();
vo.setActiveRecipients(activeRecipients);
EmailHandlerRT rt = new EmailHandlerRT(vo);
EventInstance evt = createDataPointEventInstance();
rt.eventRaised(evt);
// Ensure there is one scheduled
assertEquals(1, scheduledItems.size());
scheduledItems.clear();
// Make Inactive
evt.returnToNormal(this.timer.currentTimeMillis(), ReturnCause.RETURN_TO_NORMAL);
rt.eventInactive(evt);
assertEquals(0, scheduledItems.size());
}
Aggregations