示例#1
0
        public void Execute_TabularDateDimensionWithHeighTeenHierarchies_ListStructureContainingSevenTeenElements()
        {
            var disco = new DiscoveryRequestFactory().BuildDirect(
                ConnectionStringReader.GetAdomdTabular(),
                DiscoveryTarget.Hierarchies,
                new List<IFilter>() {
                    new CaptionFilter("Internet Operation", DiscoveryTarget.Perspectives),
                    new CaptionFilter("Date", DiscoveryTarget.Dimensions)
                });

            var factory = new AdomdDiscoveryCommandFactory();
            var cmd = factory.BuildExact(disco);

            var structs = cmd.Execute();

            Assert.That(structs.Count(), Is.EqualTo(17));
        }
示例#2
0
        public void Execute_DateDimensionLinkedToElevenMeasureGroups_ListStructureContainingTenElements()
        {
            var disco = new DiscoveryRequestFactory().BuildRelation(
                        ConnectionStringReader.GetAdomd()
                        , DiscoveryTarget.MeasureGroups
                        , new List<IFilter>() {
                            new CaptionFilter("Adventure Works", DiscoveryTarget.Perspectives)
                            , new CaptionFilter("Customer", DiscoveryTarget.Dimensions)
                        });

            var factory = new AdomdDiscoveryCommandFactory();
            var cmd = factory.BuildExact(disco);

            var structs = cmd.Execute();

            Assert.That(structs.Count(), Is.EqualTo(10));
        }
示例#3
0
        public void Execute_TabularDateDimensionLinkedToThreeMeasureGroups_ListStructureContainingThreeElements()
        {
            var disco = new DiscoveryRequestFactory().BuildRelation(
                        ConnectionStringReader.GetAdomd()
                        , DiscoveryTarget.MeasureGroups
                        , new List<IFilter>() {
                            new CaptionFilter("Internet Operation", DiscoveryTarget.Perspectives)
                            , new CaptionFilter("Date", DiscoveryTarget.Dimensions)
                        });

            var factory = new AdomdDiscoveryCommandFactory();
            var cmd = factory.BuildExact(disco);

            var structs = cmd.Execute();

            Assert.That(structs.Count(), Is.EqualTo(3));
        }
示例#4
0
        public void GetPartialMetadata_CalendarHierarchyWithSixLevels_ListStructureContainingSixElements()
        {
            var disco = new DiscoveryRequestFactory().BuildDirect(
                ConnectionStringReader.GetAdomd(),
                DiscoveryTarget.Levels,
                new List<IFilter>() {
                    new CaptionFilter("Adventure Works", DiscoveryTarget.Perspectives),
                    new CaptionFilter("Date", DiscoveryTarget.Dimensions),
                    new CaptionFilter("Calendar", DiscoveryTarget.Hierarchies)
                });

            var factory = new AdomdDiscoveryCommandFactory();
            var cmd = factory.BuildExact(disco);

            var structs = cmd.Execute();

            Assert.That(structs.Count(), Is.EqualTo(6));
        }
示例#5
0
        public void GetPartialMetadata_TabularMonthLevelWithTwoProperties_ListStructureContainingNoElement()
        {
            var disco = new DiscoveryRequestFactory().BuildDirect(
                ConnectionStringReader.GetAdomdTabular(),
                DiscoveryTarget.Properties,
                new List<IFilter>() {
                    new CaptionFilter("Internet Operations", DiscoveryTarget.Perspectives),
                    new CaptionFilter("Date", DiscoveryTarget.Dimensions),
                    new CaptionFilter("Calendar", DiscoveryTarget.Hierarchies),
                    new CaptionFilter("Month", DiscoveryTarget.Levels)
                });

            var factory = new AdomdDiscoveryCommandFactory();
            var cmd = factory.BuildExact(disco);

            var structs = cmd.Execute();

            Assert.That(structs.Count(), Is.EqualTo(0));
        }
示例#6
0
        public void GetPartialMetadata_TabularMeasureGroupsForInternetOperation_ThreeElements()
        {
            var disco = new DiscoveryRequestFactory().BuildDirect(
                ConnectionStringReader.GetAdomdTabular(),
                DiscoveryTarget.MeasureGroups,
                new List<IFilter>() {
                    new CaptionFilter("Internet Operation", DiscoveryTarget.Perspectives),
                });

            var factory = new AdomdDiscoveryCommandFactory();
            var cmd = factory.BuildExact(disco);

            var structs = cmd.Execute();

            Assert.That(structs.Count(), Is.EqualTo(3));
        }
示例#7
0
        public void GetPartialMetadata_MeasureGroupsForCubeFinance_OneElement()
        {
            var disco = new DiscoveryRequestFactory().BuildDirect(
                ConnectionStringReader.GetAdomd(),
                DiscoveryTarget.MeasureGroups,
                new List<IFilter>() {
                    new CaptionFilter("Finance", DiscoveryTarget.Perspectives),
                });

            var factory = new AdomdDiscoveryCommandFactory();
            var cmd = factory.BuildExact(disco);

            var structs = cmd.Execute();

            Assert.That(structs.Count(), Is.EqualTo(2));
        }
示例#8
0
 protected virtual AdomdDiscoveryCommand BuildCommand(AdomdDiscoveryCommandFactory factory, MetadataDiscoveryRequest actual)
 {
     return factory.BuildExact(actual);
 }
示例#9
0
 /// <summary>
 /// Change the standard Build using BuildExact by BuildLinkedTo
 /// </summary>
 /// <param name="factory"></param>
 /// <param name="actual"></param>
 /// <returns></returns>
 protected override AdomdDiscoveryCommand BuildCommand(AdomdDiscoveryCommandFactory factory, MetadataDiscoveryRequest request)
 {
     return factory.BuildLinkedTo(request);
 }