KontureSliceScope

class KontureSliceScope(val slices: List<Slice>)

Represents a functional scope containing a set of derived Slice objects for inspection and assertions.

Constructors

Link copied to clipboard
constructor(slices: List<Slice>)

Types

Link copied to clipboard
object Companion

Factory methods for constructing slice scopes.

Properties

Link copied to clipboard

Filter or assertion criteria for slices.

Functions

Link copied to clipboard
fun assertAll(message: (Slice) -> String = { "Slice ${it.key} failed assertion in KontureSliceScope" }, predicate: (Slice) -> Boolean)

Asserts that all slices in this scope satisfy the given predicate.

Link copied to clipboard
fun assertAny(message: String = "No slices in KontureSliceScope satisfied the predicate", predicate: (Slice) -> Boolean)

Asserts that at least one slice in this scope satisfies the given predicate.

Link copied to clipboard
fun assertNone(message: (Slice) -> String = { "Slice ${it.key} unexpectedly satisfied predicate in KontureSliceScope" }, predicate: (Slice) -> Boolean)

Asserts that no slices in this scope satisfy the given predicate.

Link copied to clipboard
fun byKey(keyPattern: String): KontureSliceScope

Filters this scope to slices whose key matches the specified key pattern.

Link copied to clipboard

Removes slices present in other scope from this scope by key.

Link copied to clipboard

Combines two slice scopes into a new scope containing distinct slices by key.

Link copied to clipboard

Returns a fluent assertion scope for sequential assertions on this SliceSelector.

Link copied to clipboard

Filters this slice selector to include slices whose names match the specified pattern.