protected override void Before_all_tests() { base.Before_all_tests(); TestEventSubscriptionManager .AddListener <BrowserHostCommunicationTimeoutServerEvent>(o => _publishedEventsCount++); }
protected override void Before_all_tests() { base.Before_all_tests(); TestEventSubscriptionManager .AddListener <TestCaseResult>(e => { if (e.ResultType == ResultType.SystemGeneratedFailure) { _manufacturedFailedEvents.Add(e); } }); }
public void Should_raise_file_refreshed_event_when_existing_file_changes() { bool wasXapFileRefreshed = false; TestEventSubscriptionManager.AddListener <XapFileBuildChangedServerEvent>(e => wasXapFileRefreshed = true); base.replace_test_file(); // refresh event doesn't fire in time so we wait System.Threading.Thread.Sleep(1000); wasXapFileRefreshed.ShouldBeTrue(); }
public void when_simulating_a_build_the_changed_event_should_only_be_raised_once_in_a_short_amount_of_time() { int raisedCount = 0; TestEventSubscriptionManager.AddListener <XapFileBuildChangedServerEvent>(e => { raisedCount++; }); // when building in Visual Studio, it appeared that there were // 5 different changed events thrown. base.replace_test_file(); base.replace_test_file(); base.replace_test_file(); base.replace_test_file(); base.replace_test_file(); // refresh event doesn't fire in time so we wait System.Threading.Thread.Sleep(50); raisedCount.ShouldEqual(1); }
public void SetupEventToSeeIfPublished() { TestEventSubscriptionManager .AddListener <BrowserHostCommunicationTimeoutServerEvent>(e => EventPublished = true); }