Table of Contents

Interface IModeDetector

Namespace
Splat
Assembly
Splat.dll

Detects if unit tests or design mode are currently running for the current application or library.

public interface IModeDetector
Extension Methods

Methods

InUnitTestRunner()

Determines whether the current process is running within a recognized unit test runner environment.

bool? InUnitTestRunner()

Returns

bool?

true if the process is running under a supported unit test runner; false if it is not; or null if the detection could not be performed.

Remarks

This method can be used to alter behavior when running under test conditions, such as skipping certain operations or enabling test-specific logic. The result may be null if the environment cannot be reliably detected, so callers should account for this possibility.