예제 #1
0
        public void Build_FiltersContainDisplayFolder_CommandFiltersDoesNotContainDoubleAnd()
        {
            var discovery = new HierarchyDiscoveryCommand("connectionString");

            var filters = new List <CaptionFilter>();

            filters.Add(new CaptionFilter("my perspective", DiscoveryTarget.Perspectives));
            filters.Add(new CaptionFilter("my dimension", DiscoveryTarget.Dimensions));
            filters.Add(new CaptionFilter("my display-folder", DiscoveryTarget.DisplayFolders));
            filters.Add(new CaptionFilter("my hierarchy", DiscoveryTarget.Hierarchies));

            //Method under test
            var filterString = discovery.Build(filters);

            Assert.That(filterString, Is.Not.StringContaining("and  and"));
        }
예제 #2
0
        public void Build_FiltersContainDisplayFolder_PostCommandFilterIsNotEmpty()
        {
            var discovery = new HierarchyDiscoveryCommand("connectionString");

            var filters = new List <CaptionFilter>();

            filters.Add(new CaptionFilter("my perspective", DiscoveryTarget.Perspectives));
            filters.Add(new CaptionFilter("my dimension", DiscoveryTarget.Dimensions));
            filters.Add(new CaptionFilter("my display-folder", DiscoveryTarget.DisplayFolders));
            filters.Add(new CaptionFilter("my hierarchy", DiscoveryTarget.Hierarchies));

            //Method under test
            discovery.Build(filters);

            Assert.That(discovery.PostCommandFilters, Is.Not.Null.And.Not.Empty);
        }
예제 #3
0
        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);
        }