Table of Contents

Class QueryGuardBudgetExceededException

Namespace
QueryGuard.Testing
Assembly
QueryGuard.Testing.dll

Thrown when a query budget was not satisfied.

public sealed class QueryGuardBudgetExceededException : Exception, ISerializable
Inheritance
QueryGuardBudgetExceededException
Implements
Inherited Members

Remarks

A plain exception, deliberately. Every test framework reports an unexpected exception with its message, so xUnit, NUnit, MSTest, and TUnit all render this failure without QueryGuard referencing any of them, and installing QueryGuard.Testing does not drag a test framework into a consumer's project. See docs/decisions/0010-testing-api.md.

The cost of that choice is that there is no framework-native formatting to lean on, which is why QueryGuardAssert puts the whole evidence trail in Message.

Constructors

QueryGuardBudgetExceededException()

Initializes a new instance of the QueryGuardBudgetExceededException class.

QueryGuardBudgetExceededException(string)

Initializes a new instance of the QueryGuardBudgetExceededException class.

QueryGuardBudgetExceededException(string, QueryGuardResult)

Initializes a new instance of the QueryGuardBudgetExceededException class.

QueryGuardBudgetExceededException(string, Exception)

Initializes a new instance of the QueryGuardBudgetExceededException class.

Properties

Result

Gets the result that failed, so a test can inspect the findings programmatically instead of parsing the message.