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