Beispiel #1
0
        public void TestIncorrectRemove()
        {
            var evaluator = new SchedulingServiceImpl(new TimeSourceServiceImpl(), _container.Resolve <ILockManager>());
            var callback  = new SupportScheduleCallback();

            evaluator.Remove(callback, 0);
        }
Beispiel #2
0
        public void SetUp()
        {
            _container = SupportContainer.Reset();

            _service = new SchedulingServiceImpl(
                new TimeSourceServiceImpl(), _container.Resolve <ILockManager>());
            _mgmtService = new SchedulingMgmtServiceImpl();

            // 2-by-2 table of buckets and slots
            var buckets = new ScheduleBucket[3];

            _slots = new long[buckets.Length][];
            for (int i = 0; i < buckets.Length; i++)
            {
                buckets[i] = _mgmtService.AllocateBucket();
                _slots[i]  = new long[2];
                for (int j = 0; j < _slots[i].Length; j++)
                {
                    _slots[i][j] = buckets[i].AllocateSlot();
                }
            }

            _callbacks = new SupportScheduleCallback[5];
            for (int i = 0; i < _callbacks.Length; i++)
            {
                _callbacks[i] = new SupportScheduleCallback();
            }
        }
        public void TestIncorrectRemove()
        {
            var evaluator = new SchedulingServiceImpl(new TimeSourceServiceImpl());
            var callback  = new SupportScheduleCallback();

            evaluator.Remove(callback, 0);
        }