findData
Finds the first data transmission of the specified type that matches the predicate.
Return
The first matching data transmission, or null if none found
Example:
val errorData = findData<ApiData> { it.hasError }
assertNotNull(errorData)
assertEquals("Network timeout", errorData.errorMessage)Content copied to clipboard
Parameters
predicate
Function to test each data transmission
Type Parameters
T
The type of data to search for