当前位置: 首页>>代码示例>>Java>>正文


Java EventsManager.getActiveEvents方法代码示例

本文整理汇总了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());
  }
 
开发者ID:cst316,项目名称:spring16project-Korn,代码行数:14,代码来源:HourlyEventTest.java

示例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);
  }
 
开发者ID:cst316,项目名称:spring16project-Korn,代码行数:14,代码来源:HourlyEventTest.java

示例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());
}
 
开发者ID:cst316,项目名称:spring16project-Korn,代码行数:14,代码来源:MinutleyEventTest.java

示例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);
}
 
开发者ID:cst316,项目名称:spring16project-Korn,代码行数:13,代码来源:MinutleyEventTest.java


注:本文中的net.sf.memoranda.EventsManager.getActiveEvents方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。