public void Build_FiltersContainDisplayFolder_DisplayFolderIsNotInCommandFilter() { var discovery = new MeasureDiscoveryCommand("connectionString"); var filters = new List<CaptionFilter>(); filters.Add( new CaptionFilter("my perspective", DiscoveryTarget.Perspectives)); filters.Add(new CaptionFilter("my measure-group", DiscoveryTarget.MeasureGroups)); filters.Add(new CaptionFilter("my display-folder", DiscoveryTarget.DisplayFolders)); filters.Add(new CaptionFilter("my measure", DiscoveryTarget.MeasureGroups)); //Method under test var filterString = discovery.Build(filters); Assert.That(filterString, Is.Not.StringContaining("Display").And.Not.StringContaining("Folder")); }
public void Build_FiltersContainDisplayFolder_PostCommandFilterIsNotEmpty() { var discovery = new MeasureDiscoveryCommand("connectionString"); var filters = new List<CaptionFilter>(); filters.Add(new CaptionFilter("my perspective", DiscoveryTarget.Perspectives)); filters.Add(new CaptionFilter("my measure-group", DiscoveryTarget.MeasureGroups)); filters.Add(new CaptionFilter("my display-folder", DiscoveryTarget.DisplayFolders)); filters.Add(new CaptionFilter("my measure", DiscoveryTarget.MeasureGroups)); //Method under test discovery.Build(filters); Assert.That(discovery.PostCommandFilters, Is.Not.Null.And.Not.Empty); }
public CubeMetadata GetFullMetadata() { var cube = new CubeMetadata(); if (ProgressStatusChanged != null) ProgressStatusChanged(this, new ProgressStatusEventArgs("Starting investigation ...")); using (var cmd = new PerspectiveDiscoveryCommand(ConnectionString)) cube.Import(cmd.Discover(null)); using (var cmd = new DimensionDiscoveryCommand(ConnectionString)) cube.Import(cmd.Discover(null)); using (var cmd = new HierarchyDiscoveryCommand(ConnectionString)) cube.Import(cmd.Discover(null)); using (var cmd = new LevelDiscoveryCommand(ConnectionString)) cube.Import(cmd.Discover(null)); using (var cmd = new PropertyDiscoveryCommand(ConnectionString)) cube.Import(cmd.Discover(null)); using (var cmd = new MeasureGroupDiscoveryCommand(ConnectionString)) { var rows = cmd.Discover(null); cube.Import(rows); //cube.Link(rows); } using (var cmd = new MeasureDiscoveryCommand(ConnectionString)) cube.Import(cmd.Discover(null)); if (ProgressStatusChanged != null) ProgressStatusChanged(this, new ProgressStatusEventArgs("Cube investigated")); return cube; }