private void UpdateUserSpecificFacts(Guid userId, IEnumerable <EventTracker> userTrackers)
        {
            var updatedTrackers = userTrackers.Where(tracker => tracker.IsUpdated);

            foreach (var tracker in updatedTrackers)
            {
                var trackerEvents = _eventRepository.LoadAllTrackerEvents(tracker.Id);
                var updatedFacts  = _specificFactProvider.GetFacts(trackerEvents, tracker);
                _singleFactsRepository.CreateTrackerSpecificFacts(tracker.Id, userId, updatedFacts);
                tracker.IsUpdated = false;
            }
        }
        public void GetFacts_ReturnsFacts()
        {
            InitializeFactProviderWithCalculators();
            var       tracker  = CreateTrackerWithRating();
            var       event1   = TestingMethods.CreateEventWithRating(tracker.Id, tracker.CreatorId, 2);
            var       event2   = TestingMethods.CreateEventWithRating(tracker.Id, tracker.CreatorId, 4);
            const int expected = 2;

            var facts      = _factProvider.GetFacts(new[] { event1, event2 }, tracker);
            var firstFact  = facts.First();
            var secondFact = facts.Last();

            Assert.AreEqual(expected, facts.Count);
            Assert.AreEqual("Среднее значение оценки", firstFact.FactName);
            Assert.AreEqual("Количество событий", secondFact.FactName);
        }