Exemplo n.º 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));
        }
Exemplo n.º 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));
        }
Exemplo n.º 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));
        }
Exemplo n.º 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));
        }
Exemplo n.º 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));
        }
Exemplo n.º 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));
        }
Exemplo n.º 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));
        }
Exemplo n.º 8
0
 protected virtual AdomdDiscoveryCommand BuildCommand(AdomdDiscoveryCommandFactory factory, MetadataDiscoveryRequest actual)
 {
     return factory.BuildExact(actual);
 }
Exemplo n.º 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);
 }