Fixing some Quartz integration test issues

This commit is contained in:
lahma
2010-07-13 14:59:17 +00:00
parent 4a501f3e71
commit d9db104cd2
4 changed files with 4 additions and 38 deletions

View File

@@ -83,7 +83,7 @@ namespace Spring.Scheduling.Quartz
data["foo"] = "bar";
data["number"] = 123;
cronTrigger.JobDataAsMap = data;
CollectionAssert.AreEqual(data, cronTrigger.JobDataMap, "Data differed");
CollectionAssert.AreEquivalent(data, cronTrigger.JobDataMap, "Data differed");
}
/// <summary>

View File

@@ -97,7 +97,7 @@ namespace Spring.Scheduling.Quartz
values["bar"] = null;
jobDetail.JobDataAsMap = values;
Assert.AreEqual(values.Count, jobDetail.JobDataMap.Count, "Data of inequal size");
CollectionAssert.AreEqual(values.Keys, jobDetail.JobDataMap.Keys, "JobDataMap values not equal");
CollectionAssert.AreEquivalent(values.Keys, jobDetail.JobDataMap.Keys, "JobDataMap values not equal");
}
/// <summary>
@@ -139,7 +139,7 @@ namespace Spring.Scheduling.Quartz
{
const string objectName = "springJobDetailObject";
jobDetail.ObjectName = objectName;
XmlApplicationContext ctx = new XmlApplicationContext();
StaticApplicationContext ctx = new StaticApplicationContext();
jobDetail.ApplicationContext = ctx;
string key = "applicationContextJobDataKey";
jobDetail.ApplicationContextJobDataKey = key;

View File

@@ -97,22 +97,6 @@ namespace Spring.Scheduling.Quartz
factory.AfterPropertiesSet();
}
/// <summary>
/// Tests AfterPropertiesSet behavior.
/// </summary>
[Test]
public void TestAfterPropertiesSet_AutoStartup()
{
InitForAfterPropertiesSetTest();
TestSchedulerFactory.MockScheduler.Start();
TestSchedulerFactory.Mockery.ReplayAll();
factory.SchedulerFactoryType = typeof (TestSchedulerFactory);
factory.AutoStartup = true;
factory.AfterPropertiesSet();
}
/// <summary>
/// Tests AfterPropertiesSet behavior.
/// </summary>
@@ -224,24 +208,6 @@ namespace Spring.Scheduling.Quartz
LastCall.IgnoreArguments();
}
/// <summary>
/// Tests AfterPropertiesSet behavior.
/// </summary>
[Test]
public void TestAfterPropertiesSet_AutoStartup_WithDelay()
{
// set expectations
TestSchedulerFactory.MockScheduler.JobFactory = null;
LastCall.IgnoreArguments();
TestSchedulerFactory.MockScheduler.StartDelayed(TimeSpan.FromSeconds(2));
TestSchedulerFactory.Mockery.ReplayAll();
factory.SchedulerFactoryType = typeof(TestSchedulerFactory);
factory.AutoStartup = true;
factory.StartupDelay = TimeSpan.FromSeconds(2);
factory.AfterPropertiesSet();
}
/// <summary>
/// Tests AfterPropertiesSet behavior.
/// </summary>

View File

@@ -117,7 +117,7 @@ namespace Spring.Scheduling.Quartz
data["foo"] = "bar";
data["number"] = 123;
simpleTrigger.JobDataAsMap = data;
CollectionAssert.AreEqual(data, simpleTrigger.JobDataMap, "Data differed");
CollectionAssert.AreEquivalent(data, simpleTrigger.JobDataMap, "Data differed");
}
}