Files
TomandClaude Opus 5.5 a25072e6fb
Build and deploy / build (push) Successful in 1m28s
Build and deploy / deploy (push) Successful in 20s
Add link labyrinth, static robots.txt and robots bait paths
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 23:57:52 +01:00

25 lines
691 B
C#

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 string? Path { get; init; }
public string? Host { get; init; }
public ConcurrentQueue<byte[]> Writes { get; } = new();
public ValueTask WriteAsync(ReadOnlyMemory<byte> data, CancellationToken ct)
{
ct.ThrowIfCancellationRequested();
Writes.Enqueue(data.ToArray());
return ValueTask.CompletedTask;
}
}