Class InvariantAttribute
- Namespace
- Hegel
- Assembly
- Hegel.dll
Marks a method of a state machine as an invariant, checked between steps. It takes one TestCase parameter.
[AttributeUsage(AttributeTargets.Method, Inherited = false)]
public sealed class InvariantAttribute : Attribute
- Inheritance
-
InvariantAttribute
- Inherited Members
Properties
AlwaysRun
Check after every step, rather than when the engine chooses to.
public bool AlwaysRun { get; init; }
Property Value
PauseFaults
Pause fault injection while the invariant runs: inside Antithesis, the fault injector is asked to stand down from just before the invariant is invoked until it returns or throws, so the invariant observes the system under test without a fault landing in the middle of the check. Elsewhere it has no effect.
public bool PauseFaults { get; init; }