Example #1
0
        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.");
        }
Example #2
0
 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();
 }
Example #3
0
        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.");
        }