春天如何为Quartz Scheduler编写Junit测试用例?

时间:2018-10-15 13:35:02

标签: spring quartz-scheduler autostart quartz

有什么方法可以在Spring框架中为Quartz Scheduler编写Junit测试用例。实际上,我需要在SchedulerFactoryBean(org.springframework.scheduling.quartz.SchedulerFactoryBean)中测试“ autoStartup”属性

<bean class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
 <property name="waitForJobsToCompleteOnShutdown" value="true"/>
 <property name="schedulerName" value="testMethod"/>
 <property name="autoStartup" value="false"/>
 <property name="triggers">
   <list>
     <ref bean="testMethodTrigger"/>
   </list>
 </property>
</bean>

0 个答案:

没有答案