コード例 #1
0
        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;
        }
コード例 #2
0
        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;
        }
コード例 #3
0
        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;
        }
コード例 #4
0
        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;
        }