namespace Elsa.Activities.UnitTests.Http.Helpers;
///
/// Custom test HTTP message handler that allows full control over HTTP responses for testing.
/// Use this class to simulate different HTTP scenarios without making actual network calls.
///
/// Function that defines how to handle HTTP requests and generate responses
public class TestHttpMessageHandler(Func> sendAsyncFunc) : HttpMessageHandler
{
///
/// Handles HTTP requests using the provided function.
///
protected override Task SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
{
return sendAsyncFunc(request, cancellationToken);
}
}