public void RunningJobsFlush()
        {
            RunningJobs runs = new RunningJobs(persistencPath);

            if (File.Exists(runs.PersistencePath))
            {
                File.Delete(runs.PersistencePath);
            }

            runs.Add(new JobRun(1, new TestIdJob()));
            runs.Add(new JobRun(2, new TestIdJob()));
            runs.Flush();

            Assert.IsTrue(File.Exists(runs.PersistencePath));
        }
        public void RunningJobsLoad()
        {
            RunningJobs runs = new RunningJobs(persistencPath);

            if (File.Exists(runs.PersistencePath))
            {
                File.Delete(runs.PersistencePath);
            }

            runs.Add(new JobRun(1, new TestIdJob()));
            runs.Add(new JobRun(2, new TestIdJob()));
            runs.Flush();

            runs = new RunningJobs(persistencPath);
            Assert.AreEqual(2, runs.Count);
        }