Definition
Assembly: CloudNimble.Breakdance.Assemblies.dll
Namespace: CloudNimble.Breakdance.Assemblies.Http
Inheritance: CloudNimble.Breakdance.Assemblies.Http.ResponseSnapshotHandlerBase
Syntax
Summary
A DelegatingHandler that replays previously captured HTTP responses from snapshot files.
This handler intercepts outgoing HTTP requests and returns responses from snapshot files
instead of making actual network calls. This enables deterministic testing against real
response data without hitting live endpoints.
Response snapshots are typically captured using ResponseSnapshotCaptureHandler
during an initial recording phase, then replayed during test execution.
Examples
Constructors
.ctor
Creates a new ResponseSnapshotReplayHandler that reads response snapshots from the specified path.
Syntax
Parameters
Name Type Description responseSnapshotsPathstringRoot folder path containing response snapshot files.
.ctor Inherited
Inherited from CloudNimble.Breakdance.Assemblies.Http.ResponseSnapshotHandlerBase
Creates a new ResponseSnapshotHandlerBase with the specified snapshot storage path.
Syntax
Parameters
Name Type Description responseSnapshotsPathstringRoot folder path for storing response snapshot files.
Examples
Properties
ResponseSnapshotsPath Inherited
Inherited from CloudNimble.Breakdance.Assemblies.Http.ResponseSnapshotHandlerBase
Gets the root folder path where response snapshot files are stored.
Syntax
Property Value
Type: string
Methods
GetFileExtensionString Inherited
Inherited from CloudNimble.Breakdance.Assemblies.Http.ResponseSnapshotHandlerBase
Maps the MediaType header in the HttpRequestMessage to a known list of file extensions.
Syntax
Parameters
Name Type Description requestSystem.Net.Http.HttpRequestMessageThe request to examine.
Returns
Type: string
The file extension string for the request’s Accept header.
Exceptions
Exception Description ArgumentNullExceptionThrown when request is null.
GetPathInfo Inherited
Inherited from CloudNimble.Breakdance.Assemblies.Http.ResponseSnapshotHandlerBase
Parses the RequestUri in the HttpRequestMessage into a Path -safe string
suitable for storing response snapshots on the file system.
Syntax
Parameters
Name Type Description requestSystem.Net.Http.HttpRequestMessageThe HttpRequestMessage to parse. responseSnapshotsPathstringRoot folder for storing snapshot files.
Returns
Type: (string, string)
A tuple containing the directory path and file path components.
Exceptions
Exception Description ArgumentExceptionThrown when the request has an invalid RequestUri. InvalidOperationExceptionThrown when the URI cannot be converted to a valid file path.
Inherited from CloudNimble.Breakdance.Assemblies.Http.ResponseSnapshotHandlerBase
Maps the file extension in the specified path to a known list of media types.
Syntax
Parameters
Name Type Description filePathstringThe file path to examine.
Returns
Type: string
The MIME type string for the file extension.