public virtual void TestAddingDependingJobToRunningJobFails()
        {
            Configuration conf = new Configuration();
            ControlledJob job1 = new ControlledJob(conf);

            job1.SetJobState(ControlledJob.State.Running);
            NUnit.Framework.Assert.IsFalse(job1.AddDependingJob(new ControlledJob(conf)));
        }
Exemple #2
0
 /// <summary>Add a new controlled job.</summary>
 /// <param name="aJob">the new controlled job</param>
 public virtual string AddJob(ControlledJob aJob)
 {
     lock (this)
     {
         string id = this.GetNextJobID();
         aJob.SetJobID(id);
         aJob.SetJobState(ControlledJob.State.Waiting);
         jobsInProgress.AddItem(aJob);
         return(id);
     }
 }