public void TestIsFinished() { JobManager manager = new JobManager(_env); bool expectedBoolean = true; bool resultBoolean = false; resultBoolean = manager.IsFinished(null); Assert.AreEqual(expectedBoolean, resultBoolean, "IsFinished method returned unexpected result."); JobGroup g = manager.CreateJobGroup("AAAAA", new List<EcellObject>(), new List<Ecell.Objects.EcellObject>()); manager.CreateJobEntry(g.GroupName, new ExecuteParameter()); foreach (Job job in manager.GetFinishedJobList()) job.Status = JobStatus.RUNNING; expectedBoolean = false; resultBoolean = manager.IsFinished(g.GroupName); Assert.AreEqual(expectedBoolean, resultBoolean, "IsFinished method returned unexpected result."); }
public void TestUpdate() { JobManager manager = new JobManager(_env); JobGroup g = manager.CreateJobGroup("AAAAA", new List<EcellObject>(), new List<Ecell.Objects.EcellObject>()); manager.CreateJobEntry(g.GroupName, new ExecuteParameter()); foreach (Job job in manager.GetFinishedJobList()) job.Status = JobStatus.RUNNING; manager.Update(); }
public void TestGetFinishedJobList() { JobManager manager = new JobManager(_env); List<Job> expectedList = new List<Job>(); List<Job> resultList = null; resultList = manager.GetFinishedJobList(); Assert.AreEqual(expectedList, resultList, "GetFinishedJobList method returned unexpected result."); JobGroup g = manager.CreateJobGroup("AAAAA", new List<EcellObject>(), new List<Ecell.Objects.EcellObject>()); manager.CreateJobEntry(g.GroupName, new ExecuteParameter()); resultList = manager.GetFinishedJobList(); Assert.IsNotEmpty(resultList, "GetFinishedJobList method returned unexpected result."); }