Example #1
0
        public void Dispose()
        {
            _eventWatcherManager?.Stop();
            _requestEvaluatorManager?.Stop();

            _persistence.Save(_dataSets);

            _eventWatcherManager?.Dispose();
            _requestEvaluatorManager?.Dispose();
            _persistence?.Dispose();
        }
Example #2
0
        public void DisposesWatchers(int count)
        {
            var mockEventWatchers = GetMockEventWatchers(count);

            var _eventWatcherManager = new EventWatcherManager(mockEventWatchers.Select(o => o.Object));


            _eventWatcherManager.Dispose();

            mockEventWatchers.ForEach(m => m.Verify(obj => obj.Dispose(), Times.Once));
            mockEventWatchers.ForEach(m => m.Verify(obj => obj.Stop(), Times.Once));
        }