withStoreMap

fun <T, R> StateCallback<T, R, *>?.withStoreMap(value: R, currIndex: Int, handler: (Map<NodeParameterKey<T, *>, Any?>) -> ExpectationResult<T>): ExpectationResult<T>

Create a store map (using createStoreMap) and call the provided handler, returning an ExpectationResult.

This function properly handles any errors that may bubble up as a result of StateCallback.reduceState and createStoreMap by returning an ExpectationResult.DidNotMatch.