TestRecordFluent
ConsoleMonster.TestRuns
The fluent methods of TestRecord, generated from its public properties: A property-named method sets a property and a singular-named method adds to a collection, both returning the same instance.
Inheritance
- object
- TestRecordFluent
Methods
public static TestRecord BlockFailure(TestRecord testRecord, bool value = true) #Sets TestRecord.IsBlockFailure: Whether the record stands for a block or container that failed outside a test (setup, teardown, discovery).
Parameters
- testRecord ConsoleMonster.TestRuns.TestRecord
- The instance.
- value bool = true
- The value; true when omitted.
Examples
// C# initializer or property // C# fluent
testRecord.IsBlockFailure = value; testRecord.BlockFailure(value);public static TestRecord Blocks(TestRecord testRecord, IReadOnlyList<string> value) #Sets TestRecord.Blocks: The enclosing blocks, outermost first (Describe, Context).
Parameters
- testRecord ConsoleMonster.TestRuns.TestRecord
- The instance.
- value System.Collections.Generic.IReadOnlyList<string>
- The value.
Examples
// C# initializer or property // C# fluent
testRecord.Blocks = value; testRecord.Blocks(value);public static TestRecord Duration(TestRecord testRecord, TimeSpan value) #Sets TestRecord.Duration: How long the test took.
Parameters
- testRecord ConsoleMonster.TestRuns.TestRecord
- The instance.
- value System.TimeSpan
- The value.
Examples
// C# initializer or property // C# fluent
testRecord.Duration = value; testRecord.Duration(value);public static TestRecord ErrorType(TestRecord testRecord, string? value) #Sets TestRecord.ErrorType: The exception type of an error that is not an assertion (shown before the message), or null.
Parameters
- testRecord ConsoleMonster.TestRuns.TestRecord
- The instance.
- value string?
- The value.
Examples
// C# initializer or property // C# fluent
testRecord.ErrorType = value; testRecord.ErrorType(value);public static TestRecord File(TestRecord testRecord, string? value) #Sets TestRecord.File: The file of the failing line (or of the test), or null.
Parameters
- testRecord ConsoleMonster.TestRuns.TestRecord
- The instance.
- value string?
- The value.
Examples
// C# initializer or property // C# fluent
testRecord.File = value; testRecord.File(value);public static TestRecord Group(TestRecord testRecord, string? value) #Sets TestRecord.Group: The group a summary counts the record under (a product, an area, a category), or null to count it under its container.
Parameters
- testRecord ConsoleMonster.TestRuns.TestRecord
- The instance.
- value string?
- The value.
Examples
// C# initializer or property // C# fluent
testRecord.Group = value; testRecord.Group(value);public static TestRecord Line(TestRecord testRecord, int value) #Sets TestRecord.Line: The failing line (or the test's first line), or 0 when unknown.
Parameters
- testRecord ConsoleMonster.TestRuns.TestRecord
- The instance.
- value int
- The value.
Examples
// C# initializer or property // C# fluent
testRecord.Line = value; testRecord.Line(value);public static TestRecord Message(TestRecord testRecord, string? value) #Sets TestRecord.Message: The failure message, or null.
Parameters
- testRecord ConsoleMonster.TestRuns.TestRecord
- The instance.
- value string?
- The value.
Examples
// C# initializer or property // C# fluent
testRecord.Message = value; testRecord.Message(value);public static TestRecord Reason(TestRecord testRecord, string? value) #Sets TestRecord.Reason: A sentence for why a check was skipped or not run, or null. Summaries use it when there is no code.
Parameters
- testRecord ConsoleMonster.TestRuns.TestRecord
- The instance.
- value string?
- The value.
Examples
// C# initializer or property // C# fluent
testRecord.Reason = value; testRecord.Reason(value);public static TestRecord ReasonCode(TestRecord testRecord, string? value) #Sets TestRecord.ReasonCode: A stable code for why a check was skipped or not run (NotApplicable, ServiceNotConnected, DryRun), or null. Summaries count skipped and not-run records by this code.
Parameters
- testRecord ConsoleMonster.TestRuns.TestRecord
- The instance.
- value string?
- The value.
Examples
// C# initializer or property // C# fluent
testRecord.ReasonCode = value; testRecord.ReasonCode(value);public static TestRecord Severity(TestRecord testRecord, Severity? value) #Sets TestRecord.Severity: How serious the finding is when the check fails, or null. A summary shows the worst severity among the records that did not pass.
Parameters
- testRecord ConsoleMonster.TestRuns.TestRecord
- The instance.
- value ConsoleMonster.Styling.Severity?
- The value.
Examples
// C# initializer or property // C# fluent
testRecord.Severity = value; testRecord.Severity(value);