just

fun <T> just(expected: T): Rule<T>

Returns a new Rule that represents a given value of T, representing the logic of the type T.

This method will not throw UnsupportedDataItemException directly, but it will when asDataItem is called if the expected value does not implement DataItemConvertible, or it not supported by DataItem

Return

A new Rule with which to continue building out the Rule

Parameters

expected

The representation of this Rule's logic

See also


fun <T> just(expected: T, converter: (T) -> DataItem): Rule<T>

Returns a new Rule that represents a given value of T, representing the logic of the type T.

Return

A new Rule with which to continue building out the Rule

Parameters

expected

The representation of this Rule's logic

converter

A converter to safely convert unsupported types when serializing to DataItem

See also