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
capacityint
Properties
Capacity
public int Capacity { get; }
Property Value
TotalRequests
public long TotalRequests { get; }
Property Value
Methods
OnRequest(MockRequestEntry)
public void OnRequest(MockRequestEntry entry)
Parameters
entryMockRequestEntry
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
Returns
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
limitint?
Returns
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
verificationMockVerification