mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
17 lines
540 B
C#
17 lines
540 B
C#
// Copyright (c) Microsoft. All rights reserved.
|
|
|
|
using System.Collections.Generic;
|
|
using System.Net.Http;
|
|
using System.Threading;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Microsoft.Agents.Orchestration.UnitTest;
|
|
|
|
internal sealed class HttpMessageHandlerStub : HttpMessageHandler
|
|
{
|
|
public Queue<HttpResponseMessage> ResponseQueue { get; } = new();
|
|
|
|
protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) =>
|
|
Task.FromResult(this.ResponseQueue.Dequeue());
|
|
}
|