Restructure solution into folders and fix persistence issues
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
37987a394a
commit
7c39cb5562
62 files changed
+219
-151
No files matched your search
@@ -0,0 +1,20 @@
|
||||
using System.Collections.Concurrent;
|
||||
using System.Net;
|
||||
using Flypaper.Core.Abstractions;
|
||||
using Flypaper.Core.Models;
|
||||
|
||||
namespace Flypaper.Tests.Fakes;
|
||||
|
||||
internal sealed class FakeTrapChannel : ITrapChannel
|
||||
{
|
||||
public TrapSession Session { get; } = new(Guid.NewGuid(), TrapProtocol.Http, IPAddress.Loopback, DateTimeOffset.UtcNow);
|
||||
|
||||
public ConcurrentQueue<byte[]> Writes { get; } = new();
|
||||
|
||||
public ValueTask WriteAsync(ReadOnlyMemory<byte> data, CancellationToken ct)
|
||||
{
|
||||
ct.ThrowIfCancellationRequested();
|
||||
Writes.Enqueue(data.ToArray());
|
||||
return ValueTask.CompletedTask;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user