Exemplo n.º 1
0
 protected virtual bool IsEquivalentRequest(RecordEntry entry, RecordEntry otherEntry) =>
 entry.RequestMethod == otherEntry.RequestMethod &&
 IsEquivalentUri(entry.RequestUri, otherEntry.RequestUri) &&
 CompareHeaderDictionaries(entry.Request.Headers, otherEntry.Request.Headers, VolatileHeaders) == 0;
Exemplo n.º 2
0
 protected virtual bool IsBodyEquivalent(RecordEntry record, RecordEntry otherRecord)
 {
     return((record.Response.Body ?? Array.Empty <byte>()).AsSpan()
            .SequenceEqual((otherRecord.Response.Body ?? Array.Empty <byte>())));
 }
Exemplo n.º 3
0
 public virtual bool IsEquivalentRecord(RecordEntry entry, RecordEntry otherEntry) =>
 IsEquivalentRequest(entry, otherEntry) &&
 IsEquivalentResponse(entry, otherEntry);