sequentially

Function call will answer sequentially with answers defined in block.

Example:

every { dependency.getString(any()) } sequentially {
returns("1")
returns("2")
}

dependency.getString("a") // returns "1"
dependency.getString("a") // returns "2"
dependency.getString("a") // fails with no more answers

Function call will answer sequentially with answers defined in block.

Example:

everySuspend { dependency.getString(any()) } sequentially {
returns("1")
returns("2")
}

dependency.getString("a") // returns "1"
dependency.getString("a") // returns "2"
dependency.getString("a") // fails with no more answers