private void InitializeProviderThatWillRetrieveDataOnRefresh() { var fieldInfoProvider = new FieldDescriptionProviderBaseStub(); fieldInfoProvider.DataToReturn = new EmptyFieldInfoData(); var engine = new PivotEngineMock(); engine.SetToReturnResponse(); this.provider = new LocalDataSourceProvider(engine, fieldInfoProvider); this.provider.GroupFactory = new DataGroupFactory(); this.provider.DeferUpdates = true; this.provider.RowGroupDescriptions.Add(new PropertyGroupDescription() { PropertyName = "Product" }); this.provider.ColumnGroupDescriptions.Add(new PropertyGroupDescription() { PropertyName = "Promotion" }); this.provider.AggregateDescriptions.Add(new PropertyAggregateDescription() { PropertyName = "Quantity" }); this.provider.StatusChanged += OnProviderStatusChanged; }
private void InitializeProviderThatCannotRetrieveFieldInfosOnRefresh() { var fieldInfoProvider = new FieldDescriptionProviderBaseStub(); fieldInfoProvider.ErrorToReturn = new Exception("Dummy exception"); var engine = new PivotEngineMock(); this.provider = new LocalDataSourceProvider(engine, fieldInfoProvider); this.provider.GroupFactory = new DataGroupFactory(); this.provider.DeferUpdates = true; this.provider.RowGroupDescriptions.Add(new PropertyGroupDescription() { PropertyName = "Product" }); this.provider.ColumnGroupDescriptions.Add(new PropertyGroupDescription() { PropertyName = "Promotion" }); this.provider.AggregateDescriptions.Add(new PropertyAggregateDescription() { PropertyName = "Quantity" }); this.provider.StatusChanged += OnProviderStatusChanged; }
private void InitializeProviderThatIsGettingFieldInfosOnRefresh() { var fieldInfoProvider = new FieldDescriptionProviderBaseStub(); fieldInfoProvider.ActionOnGetDescriptionsDataAsync = (s) => { /* do not return */ }; var engine = new PivotEngineMock(); this.provider = new LocalDataSourceProvider(engine, fieldInfoProvider); this.provider.GroupFactory = new DataGroupFactory(); this.provider.DeferUpdates = true; this.provider.RowGroupDescriptions.Add(new PropertyGroupDescription() { PropertyName = "Product" }); this.provider.ColumnGroupDescriptions.Add(new PropertyGroupDescription() { PropertyName = "Promotion" }); this.provider.AggregateDescriptions.Add(new PropertyAggregateDescription() { PropertyName = "Quantity" }); this.provider.StatusChanged += OnProviderStatusChanged; }
private void InitializeProviderWithXmlaClientThatReturnsErrorOnSendRequestCompleted() { var fieldInfoProvider = new FieldDescriptionProviderBaseStub(); fieldInfoProvider.DataToReturn = new EmptyFieldInfoData(); var engine = new PivotEngineMock(); engine.SetToReturnErrorResponse(); this.provider = new LocalDataSourceProvider(engine, fieldInfoProvider); this.provider.GroupFactory = new DataGroupFactory(); this.provider.DeferUpdates = true; this.provider.RowGroupDescriptions.Add(new PropertyGroupDescription() { PropertyName = "Product" }); this.provider.ColumnGroupDescriptions.Add(new PropertyGroupDescription() { PropertyName = "Promotion" }); this.provider.AggregateDescriptions.Add(new PropertyAggregateDescription() { PropertyName = "Quantity" }); this.provider.StatusChanged += OnProviderStatusChanged; }