Example #1
0
        public void TestUpgradedReportSpecList()
        {
            var toolList = new ToolList();

            toolList.AddDefaults();
            var cleanPersistedViews = new PersistedViews(null, null, toolList);

            for (int oldRevision = 0; oldRevision < 2; oldRevision++)
            {
                var oldReportSpecList = new ReportSpecList {
                    RevisionIndex = oldRevision
                };
                oldReportSpecList.AddRange(oldReportSpecList.GetDefaults(oldRevision));
                var upgradedPersistedViews = new PersistedViews(oldReportSpecList, null, toolList);
                foreach (var group in new[] { PersistedViews.MainGroup, PersistedViews.ExternalToolsGroup })
                {
                    var cleanViews    = cleanPersistedViews.GetViewSpecList(group.Id).ViewSpecs.ToArray();
                    var upgragedViews = upgradedPersistedViews.GetViewSpecList(group.Id).ViewSpecs.ToArray();

                    CollectionAssert.AreEquivalent(cleanViews, upgragedViews,
                                                   "Upgraded from rev {0} in group {1}", oldRevision, group);
                }
            }
        }
Example #2
0
 public ViewChangeListener(PersistedViews persistedViews, SkylineDataSchema skylineDataSchema)
 {
     _persistedViews    = persistedViews;
     _skylineDataSchema = skylineDataSchema;
 }