public void CompletedEvent_WhenEngineCompletedEventIsRaised_IsRaised() { var engine = new PivotEngineMock(); this.provider = new LocalDataSourceProvider(engine); this.provider.GroupFactory = new DataGroupFactory(); this.provider.StatusChanged += this.OnProviderStatusChanged; engine.RaiseCompletedEvent(new DataEngineCompletedEventArgs(null, DataEngineStatus.Completed)); Assert.IsTrue(this.StatuschangedEventWasRaised()); }
public void Status_WhenEngineCompletedEventIsRaisedWithFaulted_IsSetToFaulted() { var engine = new PivotEngineMock(); this.provider = new LocalDataSourceProvider(engine); this.provider.GroupFactory = new DataGroupFactory(); var expectedStatus = DataProviderStatus.Faulted; engine.RaiseCompletedEvent(new DataEngineCompletedEventArgs(null, DataEngineStatus.Faulted)); var actualStatus = this.provider.Status; Assert.AreEqual(expectedStatus, actualStatus); }