C# Class SonarLint.VisualStudio.Progress.UnitTests.SequentialProgressControllerHelper

Test extension methods
Datei anzeigen Open project: SonarSource-VisualStudio/sonarlint-visualstudio Class Usage Examples

Public Methods

Method Description
ConfigureToThrowAssertExceptions ( SequentialProgressController controller ) : ConfigurableErrorNotifier

The ProgressControllerStep which are used by default will swallow the assert exceptions which means that investigating why something is failing requires more time and effort. This extension method will record the first UnitTestAssertException which was thrown during execution and will rethrow it on a way that will allow the test to fail and see the original stack that caused the test failure (on Finished event)

InitializeWithTestErrorHandling ( SequentialProgressController controller ) : ConfigurableErrorNotifier

Initializes the specified controller with custom error handler that will allow assertions to be raised

Method Details

ConfigureToThrowAssertExceptions() public static method

The ProgressControllerStep which are used by default will swallow the assert exceptions which means that investigating why something is failing requires more time and effort. This extension method will record the first UnitTestAssertException which was thrown during execution and will rethrow it on a way that will allow the test to fail and see the original stack that caused the test failure (on Finished event)
public static ConfigureToThrowAssertExceptions ( SequentialProgressController controller ) : ConfigurableErrorNotifier
controller SonarLint.VisualStudio.Progress.Controller.SequentialProgressController The controller to configure
return ConfigurableErrorNotifier

InitializeWithTestErrorHandling() public static method

Initializes the specified controller with custom error handler that will allow assertions to be raised
public static InitializeWithTestErrorHandling ( SequentialProgressController controller ) : ConfigurableErrorNotifier
controller SonarLint.VisualStudio.Progress.Controller.SequentialProgressController Controller instance to initialize
return ConfigurableErrorNotifier