API Reference
TestBuilder
Fluent test builder used by rules to craft assertions over results. Split into partials for property/object helpers.
Inheritance
- Object
- TestBuilder
Usage
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by
- Method TestBuilder.Enabled
- Method TestBuilder.ExpectCount
- Method TestBuilder.Named
- Method TestBuilder.RequiresAction
- Method TestBuilder.WhenFalse
- Method TestBuilder.WhenTrue
- Method TestBuilder.WithDescription
- Method TestBuilder.WithImportance
- Method TestBuilder.WithOutcomeMessages
- Method TestBuilder.WithScoreKind
- Method TestBuilder.WithWeight
- Method ObjectTestBuilder.HasProperty
- Method ObjectTestBuilder.IsType
- Method ObjectTestBuilder.Satisfies
- Method PropertyTestBuilder.AtLeastProperty
- Method PropertyTestBuilder.AtLeastWhenPropertyAtLeast
- Method PropertyTestBuilder.AtLeastWhenSecondaryAtLeast
- Method PropertyTestBuilder.AtMostProperty
- Method PropertyTestBuilder.Between
- Method PropertyTestBuilder.BetweenParameter
- Method PropertyTestBuilder.Contains
- Method PropertyTestBuilder.CountScale
- Method PropertyTestBuilder.EndsWith
- Method PropertyTestBuilder.EqualTo
- Method PropertyTestBuilder.EqualToProperty
- Method PropertyTestBuilder.GreaterOrEqualToPercentOf
- Method PropertyTestBuilder.GreaterThan
- Method PropertyTestBuilder.GreaterThanOrEqual
- Method PropertyTestBuilder.GreaterThanOrEqualParameter
- Method PropertyTestBuilder.GreaterThanOrEqualParameter
- Method PropertyTestBuilder.GreaterThanOrEqualToProperty
- Method PropertyTestBuilder.GreaterThanParameter
- Method PropertyTestBuilder.GreaterThanParameter
- Method PropertyTestBuilder.GreaterThanProperty
- Method PropertyTestBuilder.HasAtLeast
- Method PropertyTestBuilder.HasAtMost
- Method PropertyTestBuilder.HasCount
- Method PropertyTestBuilder.HasMaxCount
- Method PropertyTestBuilder.HasMinCount
- Method PropertyTestBuilder.In
- Method PropertyTestBuilder.IsEmpty
- Method PropertyTestBuilder.IsNotEmpty
- Method PropertyTestBuilder.IsNotNull
- Method PropertyTestBuilder.IsNull
- Method PropertyTestBuilder.LessOrEqualToPercentOf
- Method PropertyTestBuilder.LessThan
- Method PropertyTestBuilder.LessThanOrEqual
- Method PropertyTestBuilder.LessThanOrEqualParameter
- Method PropertyTestBuilder.LessThanOrEqualParameter
- Method PropertyTestBuilder.LessThanOrEqualToProperty
- Method PropertyTestBuilder.LessThanParameter
- Method PropertyTestBuilder.LessThanParameter
- Method PropertyTestBuilder.LessThanProperty
- Method PropertyTestBuilder.Matches
- Method PropertyTestBuilder.NotEquals
- Method PropertyTestBuilder.NotEqualToProperty
- Method PropertyTestBuilder.NotIn
- Method PropertyTestBuilder.StartsWith
- Method PropertyTestBuilder.WithScale
Accepted by parameters
- Method RuleBuilder.AddTest
Constructors
public TestBuilder(String name = null) #Creates a new fluent test builder.
Parameters
- name System.String = null
- Optional test display name.
Methods
public TestBuilder Enabled(Boolean enabled = true) #TestBuilderEnables or disables this test.
Parameters
- enabled System.Boolean = true
public TestBuilder ExpectCount(Int32 expected) #TestBuilderAsserts the dataset-level count equals the specified value.
Parameters
- expected System.Int32
public TestBuilder Named(String name) #TestBuilderSets/overrides the test display name (supports {Param} interpolation at render time).
Parameters
- name System.String
public TestBuilder RequiresAction(ActionType action) #TestBuilderMarks the remediation action level for this test.
Parameters
- action TestimoX.Definitions.ActionType
public TestBuilder WhenFalse(TestimoStatus status, String message = null) #TestBuilderStatus applied when the assertion evaluates to false. Optional message template replaces generic outputs.
Parameters
- status TestimoX.Definitions.TestimoStatus
- Status when the test fails.
- message System.String = null
- Optional friendly message shown on fail (supports {Actual}/{Expected} and {Param} tokens).
public TestBuilder WhenTrue(TestimoStatus status, String message = null) #TestBuilderStatus applied when the assertion evaluates to true. Optional message template replaces generic outputs.
Parameters
- status TestimoX.Definitions.TestimoStatus
- Status when the test passes.
- message System.String = null
- Optional friendly message shown on pass (supports {Param} tokens).
public PropertyTestBuilder Where(String propertyPath) #PropertyTestBuilderTargets a property path for subsequent comparisons/filters.
Parameters
- propertyPath System.String
public ObjectTestBuilder WhereObject() #ObjectTestBuilderTargets the whole object for predicate-based checks.
public PropertyTestBuilder WhereResults() #PropertyTestBuilderTargets the results collection (root) for dataset-level filters and counts.
public TestBuilder WithDescription(String description) #TestBuilderOptional description or extended value shown by renderers.
Parameters
- description System.String
public TestBuilder WithImportance(Importance importance) #TestBuilderSets the importance level used by renderers and scoring.
Parameters
- importance TestimoX.Definitions.Importance
public TestBuilder WithOutcomeMessages(String onPass = null, String onFail = null) #TestBuilderSet friendly messages shown on pass/fail instead of generic texts.
Parameters
- onPass System.String = null
- onFail System.String = null
public TestBuilder WithScoreKind(ScoreKind kind) #TestBuilderSet scoring domain override for this test.
Parameters
- kind TestimoX.Definitions.ScoreKind
public TestBuilder WithWeight(Double weight) #TestBuilderAdjusts the scoring weight for this test. A value of 1.0 keeps default impact; values > 1.0 increase penalty impact when the test fails; values between 0 and 1 reduce impact.
Parameters
- weight System.Double
- Multiplier applied to penalty units (must be positive).