本文整理汇总了Java中net.sf.memoranda.EventsManager.getActiveEvents方法的典型用法代码示例。如果您正苦于以下问题:Java EventsManager.getActiveEvents方法的具体用法?Java EventsManager.getActiveEvents怎么用?Java EventsManager.getActiveEvents使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.sf.memoranda.EventsManager
的用法示例。
在下文中一共展示了EventsManager.getActiveEvents方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testEventHourPeriod
import net.sf.memoranda.EventsManager; //导入方法依赖的package包/类
@Test
public void testEventHourPeriod() {
EventsManager.createRepeatableEvent(repeatType, startDate, endDate, period, hour, minute, text, workDays);
//all current events
Vector events= (Vector)EventsManager.getActiveEvents();
//gets the new event that was just created
Event event= (Event) events.get(events.size() - 1);
// sends to eventMinute and gets the current time and checks when the next notify pop will pop up.
EventsScheduler.eventHour(event);
System.out.println("[DEBUG] " + period +" = "+event.getPeriod());
// ensures time we set to timer is the same
assertEquals(period, event.getPeriod());
}
示例2: testEventHourExists
import net.sf.memoranda.EventsManager; //导入方法依赖的package包/类
@Test
public void testEventHourExists() {
int beforeAdded = EventsScheduler.counter();
EventsManager.createRepeatableEvent(repeatType, startDate, endDate, period, hour+1, minute+1, text, workDays);
Vector events= (Vector)EventsManager.getActiveEvents();
Event event= (Event) events.get(events.size() - 1);
EventsScheduler.eventHour(event);
int afterAdded = 0;
afterAdded = EventsScheduler.counter();
System.out.println("[DEBUG] " + beforeAdded +" != "+afterAdded);
// ensures that event was added to the timer vector
assertFalse(beforeAdded == afterAdded);
}
示例3: testEventMinutePeriod
import net.sf.memoranda.EventsManager; //导入方法依赖的package包/类
@Test
public void testEventMinutePeriod() {
EventsManager.createRepeatableEvent(repeatType, startDate, endDate, period, hour, minute, text, workDays);
// all current events
Vector events= (Vector)EventsManager.getActiveEvents();
//gets the event we created
Event event= (Event) events.get(events.size() - 1);
// sends to eventMinute and gets the current time and checks when the next notify pop will pop up.
EventsScheduler.eventMinute(event);
System.out.println("[DEBUG] " + period +" = "+event.getPeriod());
// ensures time we set to timer is the same
assertEquals(period, event.getPeriod());
}
示例4: testEventMinuteExists
import net.sf.memoranda.EventsManager; //导入方法依赖的package包/类
@Test
public void testEventMinuteExists() {
int beforeAdded = EventsScheduler.counter();
EventsManager.createRepeatableEvent(repeatType, startDate, endDate, period, hour+1, minute+1, text, workDays);
Vector events= (Vector)EventsManager.getActiveEvents();
Event event= (Event) events.get(events.size() - 1);
EventsScheduler.eventMinute(event);
int afterAdded = EventsScheduler.counter();
System.out.println("[DEBUG] " + beforeAdded +" != "+afterAdded);
// ensures that event was added to the timer vector
assertFalse(beforeAdded == afterAdded);
}