Пример #1
0
        public void TestIsError()
        {
            JobManager manager = new JobManager(_env);

            bool expectedBoolean = false;
            bool resultBoolean = false;
            JobGroup g = manager.CreateJobGroup("AAAAA", new List<EcellObject>(), new List<Ecell.Objects.EcellObject>());
            resultBoolean = manager.IsError(g.GroupName);
            Assert.AreEqual(expectedBoolean, resultBoolean, "IsError method returned unexpected result.");

            manager.CreateJobEntry(g.GroupName, new ExecuteParameter());
            foreach (Job job in manager.GetFinishedJobList())
                job.Status = JobStatus.ERROR;

            expectedBoolean = true;
            resultBoolean = manager.IsError(g.GroupName);
            Assert.AreEqual(expectedBoolean, resultBoolean, "IsFinished method returned unexpected result.");
        }