public void GetPeriodicityCountsForEvaluation_EmptyEvaluation() { var cata = new Catalogue(CatalogueRepository, "MyCata"); var dqeRepo = new DQERepository(CatalogueRepository); var eval = new Evaluation(dqeRepo, cata); var dict = PeriodicityState.GetPeriodicityCountsForEvaluation(eval, true); Assert.IsNotNull(dict); Assert.IsEmpty(dict); }
public void GenerateChart() { ragSmiley1.Reset(); ragSmiley1.SetVisible(false); var allCatalogues = _collection.GetCatalogues(); Dictionary <Catalogue, Dictionary <DateTime, ArchivalPeriodicityCount> > cataloguesToAdd = new Dictionary <Catalogue, Dictionary <DateTime, ArchivalPeriodicityCount> >(); DQERepository dqeRepository; try { dqeRepository = new DQERepository(_activator.RepositoryLocator.CatalogueRepository); } catch (NotSupportedException e) { ragSmiley1.SetVisible(true); ragSmiley1.Fatal(e); return; } foreach (var cata in allCatalogues.OrderBy(c => c.Name)) { var eval = dqeRepository.GetMostRecentEvaluationFor(cata); Dictionary <DateTime, ArchivalPeriodicityCount> dictionary = null; if (eval != null) { dictionary = PeriodicityState.GetPeriodicityCountsForEvaluation(eval); } cataloguesToAdd.Add(cata, dictionary); } //every month seen in every dataset ever var buckets = GetBuckets(cataloguesToAdd); racewayRenderArea.AddTracks(_activator, cataloguesToAdd, buckets, _collection.IgnoreRows); racewayRenderArea.Refresh(); this.Invalidate(); }