public void Execute_TabularSchemas_FourElements()
        {
            var conn    = new AdomdConnection(ConnectionStringReader.GetAdomdTabular());
            var factory = new TabularStructureDiscoveryFactory(conn);
            var cmd     = factory.Instantiate(Target.Perspectives, TargetType.Object,
                                              new CaptionFilter[] {
            });

            var structs = cmd.Execute();

            Assert.That(structs.Count(), Is.EqualTo(4));
        }
        public void Execute_TabularMeasureGroupsForFinance_ThreeElements()
        {
            var conn    = new AdomdConnection(ConnectionStringReader.GetAdomdTabular());
            var factory = new TabularStructureDiscoveryFactory(conn);
            var cmd     = factory.Instantiate(Target.MeasureGroups, TargetType.Object,
                                              new CaptionFilter[] {
                new CaptionFilter(Target.Perspectives, "Internet Operation"),
            });

            var structs = cmd.Execute();

            Assert.That(structs.Count(), Is.EqualTo(3));
        }
        public void Execute_OnSchemaNamedInternetOperation_ListStructureContainingTenTables()
        {
            var conn    = new AdomdConnection(ConnectionStringReader.GetAdomdTabular());
            var factory = new TabularStructureDiscoveryFactory(conn);
            var cmd     = factory.Instantiate(Target.Tables, TargetType.Object,
                                              new CaptionFilter[] {
                new CaptionFilter(Target.Perspectives, "Internet Operation")
            });

            var structs = cmd.Execute();

            Assert.That(structs.Count(), Is.EqualTo(15));
        }
        public void Execute_TabularDateDimensionWithHeighTeenHierarchies_ListStructureContainingSevenTeenElements()
        {
            var conn    = new AdomdConnection(ConnectionStringReader.GetAdomdTabular());
            var factory = new TabularStructureDiscoveryFactory(conn);
            var cmd     = factory.Instantiate(Target.Hierarchies, TargetType.Object,
                                              new CaptionFilter[] {
                new CaptionFilter(Target.Perspectives, "Internet Operation"),
                new CaptionFilter(Target.Dimensions, "Date")
            });

            var structs = cmd.Execute();

            Assert.That(structs.Count(), Is.EqualTo(17));
        }
        public void Execute_TabularColumnsForInternetSales_TwentySevenElements()
        {
            var conn    = new AdomdConnection(ConnectionStringReader.GetAdomdTabular());
            var factory = new TabularStructureDiscoveryFactory(conn);
            var cmd     = factory.Instantiate(Target.Columns, TargetType.Object,
                                              new CaptionFilter[] {
                new CaptionFilter(Target.Perspectives, "Internet Operation"),
                new CaptionFilter(Target.Tables, "Internet Sales"),
            });

            var structs = cmd.Execute();

            Assert.That(structs.Count(), Is.EqualTo(27));
        }
        public void Execute_TabularMonthLevelWithTwoProperties_ListStructureContainingNoElement()
        {
            var conn    = new AdomdConnection(ConnectionStringReader.GetAdomdTabular());
            var factory = new TabularStructureDiscoveryFactory(conn);
            var cmd     = factory.Instantiate(Target.Properties, TargetType.Object,
                                              new CaptionFilter[] {
                new CaptionFilter(Target.Perspectives, "Adventure Works"),
                new CaptionFilter(Target.Dimensions, "Date"),
                new CaptionFilter(Target.Hierarchies, "Calendar"),
                new CaptionFilter(Target.Levels, "Month")
            });

            var structs = cmd.Execute();

            Assert.That(structs.Count(), Is.EqualTo(0));
        }