Initial version of Quartz 2.0 integration

This commit is contained in:
Marko Lahma
2012-02-11 17:55:35 +02:00
parent 387ba32476
commit fa894204d3
78 changed files with 134392 additions and 51635 deletions

View File

@@ -14,15 +14,11 @@
* limitations under the License.
*/
using System;
using NUnit.Framework;
using Quartz;
using Quartz.Job;
using Quartz.Spi;
using Spring.Scheduling.Quartz;
namespace Spring.Scheduling.Quartz
{
/// <summary>
@@ -52,8 +48,12 @@ namespace Spring.Scheduling.Quartz
try
{
// this actually fails already in Quartz level
TriggerFiredBundle bundle = TestUtil.CreateMinimalFiredBundleWithTypedJobDetail(typeof(object));
TriggerFiredBundle bundle = TestUtil.CreateMinimalFiredBundleWithTypedJobDetail(typeof (object));
#if QUARTZ_2_0
jobFactory.NewJob(bundle, null);
#else
jobFactory.NewJob(bundle);
#endif
Assert.Fail("Created job which was not an IJob");
}
catch (ArgumentException)
@@ -85,14 +85,15 @@ namespace Spring.Scheduling.Quartz
[Test]
public void TestNewJob_NormalIJob()
{
TriggerFiredBundle bundle = TestUtil.CreateMinimalFiredBundleWithTypedJobDetail(typeof(NoOpJob));
TriggerFiredBundle bundle = TestUtil.CreateMinimalFiredBundleWithTypedJobDetail(typeof (NoOpJob));
#if QUARTZ_2_0
IJob job = jobFactory.NewJob(bundle, null);
#else
IJob job = jobFactory.NewJob(bundle);
#endif
Assert.IsNotNull(job, "Returned job was null");
}
}
internal class NoOpThreadStartJob : NoOpJob