public void Execute_AdventureWorksDimensions_ListStructureContainingNotMeasure()
        {
            var conn = new AdomdConnection(ConnectionStringReader.GetAdomd());
            var factory = new OlapStructureDiscoveryFactory(conn);
            var cmd = factory.Instantiate(Target.Dimensions, TargetType.Object,
                new CaptionFilter[] {
                    new CaptionFilter(Target.Perspectives, "Adventure Works")
                });

            var structs = cmd.Execute();

            Assert.That(structs, Is.Not.Contains("Measures"));
        }
        public void Execute_DateDimensionWithHeighTeenHierarchies_ListStructureContainingCorrectCountOfElements()
        {
            var conn = new AdomdConnection(ConnectionStringReader.GetAdomd());
            var factory = new OlapStructureDiscoveryFactory(conn);
            var cmd = factory.Instantiate(Target.Hierarchies, TargetType.Object,
                new CaptionFilter[] {
                    new CaptionFilter(Target.Perspectives, "Adventure Works"),
                    new CaptionFilter(Target.Dimensions, "Date")
                });

            var structs = cmd.Execute();

            Assert.That(structs.Count(), Is.EqualTo(18));
        }
        public void Execute_DateDimensionLinkedTo_ListStructureContainingTenElements()
        {
            var conn = new AdomdConnection(ConnectionStringReader.GetAdomd());
            var factory = new OlapStructureDiscoveryFactory(conn);
            var cmd = factory.Instantiate(Target.MeasureGroups, TargetType.Relation,
                        new CaptionFilter[] {
                            new CaptionFilter(Target.Perspectives, "Adventure Works")
                            , new CaptionFilter(Target.Dimensions, "Date")
                        });

            var structs = cmd.Execute();

            Assert.That(structs.Count(), Is.EqualTo(10));
        }
        public void Execute_MeasureGroupsForCubeFinance_CorrectCountOfElements()
        {
            var conn = new AdomdConnection(ConnectionStringReader.GetAdomd());
            var factory = new OlapStructureDiscoveryFactory(conn);
            var cmd = factory.Instantiate(Target.MeasureGroups, TargetType.Object,
                new CaptionFilter[] {
                    new CaptionFilter(Target.Perspectives,"Finance"),
                });

            var structs = cmd.Execute();

            Assert.That(structs.Count(), Is.EqualTo(2));
        }
        public void Execute_SetsWithPerspective_ListStructureContainingCorrectCountOfElements()
        {
            var conn = new AdomdConnection(ConnectionStringReader.GetAdomd());
            var factory = new OlapStructureDiscoveryFactory(conn);
            var cmd = factory.Instantiate(Target.Sets, TargetType.Object,
                new CaptionFilter[] {
                    new CaptionFilter(Target.Perspectives, "Channel Sales")
                });

            var structs = cmd.Execute();

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