Пример #1
0
        public void Remove_RemovesGivenJobFromHistory()
        {
            _jobHistoryManager.History = _storedHistoryFullCapacity;
            var removedjob = _storedHistoryFullCapacity.First();

            _jobHistoryManager.Remove(removedjob);

            Assert.IsFalse(_jobHistoryManager.History.Contains(removedjob), "Did not remove job from history");
        }
        public void Remove_HistoryContainsJob_JobGetsRemovedFromHistory()
        {
            _jobHistoryManager.Load(); //Adds jobs to history
            var removedJob = _jobHistoryManager.History[2];

            _jobHistoryManager.Remove(removedJob);

            Assert.AreEqual(_capacity - 1, _jobHistoryManager.History.Count);
            Assert.IsFalse(_jobHistoryManager.History.Contains(removedJob), "History contains removed job");
        }