public void Dispose() { _eventWatcherManager?.Stop(); _requestEvaluatorManager?.Stop(); _persistence.Save(_dataSets); _eventWatcherManager?.Dispose(); _requestEvaluatorManager?.Dispose(); _persistence?.Dispose(); }
public void StopsWatchers(int count) { var mockEventWatchers = GetMockEventWatchers(count); var _eventWatcherManager = new EventWatcherManager(mockEventWatchers.Select(o => o.Object)); _eventWatcherManager.Stop(); mockEventWatchers.ForEach(m => m.Verify(obj => obj.Stop(), Times.Once)); }