Class BowireMatchPredicate

Namespace
Kuestenlogik.Bowire.Mocking
Assembly
Kuestenlogik.Bowire.dll

One name-scoped match predicate applied to a query parameter, header, or cookie (mock matcher, #402). The name must be present unless Present is false; when an operator (EqualTo / Matches / Contains) is set, at least one value must satisfy it. With only Name set the predicate asserts mere presence.

public sealed class BowireMatchPredicate
Inheritance
BowireMatchPredicate
Inherited Members

Constructors

BowireMatchPredicate()

public BowireMatchPredicate()

Properties

CaseInsensitive

Case-insensitive comparison for EqualTo / Contains / Matches.

[JsonPropertyName("caseInsensitive")]
public bool CaseInsensitive { get; init; }

Property Value

bool

Contains

Require a value containing this substring (respects CaseInsensitive).

[JsonPropertyName("contains")]
public string? Contains { get; init; }

Property Value

string

EqualTo

Require a value exactly equal to this (respects CaseInsensitive).

[JsonPropertyName("equals")]
public string? EqualTo { get; init; }

Property Value

string

Matches

Require a value matching this regex.

[JsonPropertyName("matches")]
public string? Matches { get; init; }

Property Value

string

Name

Query-param / header / cookie name to test.

[JsonPropertyName("name")]
public string Name { get; init; }

Property Value

string

Present

true = the name must be present (the default when any operator is set); false = the name must be ABSENT (a negative predicate).

[JsonPropertyName("present")]
public bool? Present { get; init; }

Property Value

bool?