API Reference
TestBuilder
Fluent test builder used by rules to craft assertions over results. Split into partials for property/object helpers.
Inheritance
- Object
- TestBuilder
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).