本文整理汇总了C#中Scheduler.PopJob方法的典型用法代码示例。如果您正苦于以下问题:C# Scheduler.PopJob方法的具体用法?C# Scheduler.PopJob怎么用?C# Scheduler.PopJob使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Scheduler
的用法示例。
在下文中一共展示了Scheduler.PopJob方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AddJobTest
public void AddJobTest()
{
Owner owner = new Owner("Testuser"+userId++);
Scheduler target = new Scheduler();
Job job = new Job("AddJob Test", owner, 6, 4);
target.AddJob(job);
Job job2 = target.PopJob();
Assert.AreSame(job, job2);
}
示例2: RemoveJobTest
public void RemoveJobTest()
{
Scheduler target = new Scheduler();
Job job = new Job("RemoveJob test", owner, 4, (float)1.4);
target.AddJob(job);
target.RemoveJob(job);
Assert.IsNull(target.PopJob());
}
示例3: PopJobTest
public void PopJobTest()
{
Job job1 = new Job("PopJob test 1", owner, 6, (float)5.0);
Job job2 = new Job("PopJob test 2", owner, 1, (float)1.2);
Scheduler target = new Scheduler();
target.AddJob(job1);
System.Threading.Thread.Sleep(1);
target.AddJob(job2);
Job expected = job1;
Job actual = target.PopJob();
Assert.AreEqual(expected.name, actual.name);
}