Class OpResult
java.lang.Object
codes.grow.packages.betterstack.testing.OpResult
A step result with optional extra views for the expectations
count and tree. A
handler may return a plain value instead.-
Method Summary
Modifier and TypeMethodDescriptioncount()Returns the explicit count.static OpResultWraps a value.tree()Returns the tree view.value()Returns the wrapped value.withCount(int count) Returns a copy with an explicit count (e.g. the number of spans of a trace).Returns a copy with a parent-name to child-names view (span trees).
-
Method Details
-
of
Wraps a value.- Parameters:
value- result value, may be null- Returns:
- a new result
-
withCount
Returns a copy with an explicit count (e.g. the number of spans of a trace).- Parameters:
count- element count- Returns:
- a new result
-
withTree
Returns a copy with a parent-name to child-names view (span trees).- Parameters:
tree- parent name to child names- Returns:
- a new result
-
value
Returns the wrapped value.- Returns:
- the value, may be null
-
count
Returns the explicit count.- Returns:
- the count, or empty
-
tree
Returns the tree view.- Returns:
- the tree, or empty
-