Class MockRequestLog

Namespace
Kuestenlogik.Bowire.Mock.Management
Assembly
Kuestenlogik.Bowire.Mock.dll

Bounded ring buffer of request entries per mock instance. Capacity defaults to 1000 — once full, the oldest entries drop. Reads return a defensive snapshot in newest-first order so the UI can render the log table without iterating live state.

public sealed class MockRequestLog : IMockRequestObserver
Inheritance
MockRequestLog
Implements
Inherited Members

Constructors

MockRequestLog(int)

public MockRequestLog(int capacity = 1000)

Parameters

capacity int

Properties

Capacity

public int Capacity { get; }

Property Value

int

TotalRequests

public long TotalRequests { get; }

Property Value

long

Methods

OnRequest(MockRequestEntry)

public void OnRequest(MockRequestEntry entry)

Parameters

entry MockRequestEntry

Snapshot(int?, long)

Snapshot of the buffered entries, newest first. limit caps the returned count (≤ Capacity); sinceSequence excludes entries older or equal to that sequence (clients tailing).

public IReadOnlyList<MockRequestEntry> Snapshot(int? limit = null, long sinceSequence = 0)

Parameters

limit int?
sinceSequence long

Returns

IReadOnlyList<MockRequestEntry>

Unmatched(int?)

#409: buffered requests that did NOT match any stub (outcome miss or 404), newest first — the near-miss listing behind GET /api/mocks/{id}/requests/unmatched.

public IReadOnlyList<MockRequestEntry> Unmatched(int? limit = null)

Parameters

limit int?

Returns

IReadOnlyList<MockRequestEntry>

Verify(MockVerification)

#409: run a MockVerification over the whole buffered journal — the embedded-host convenience behind POST /api/mocks/{id}/verify.

public MockVerificationResult Verify(MockVerification verification)

Parameters

verification MockVerification

Returns

MockVerificationResult