-
Notifications
You must be signed in to change notification settings - Fork 199
Open
Labels
enhancementgood first issueIf you're looking to contribute, this issue is the way to go!If you're looking to contribute, this issue is the way to go!
Description
Hello,
Is there an option in Cuckoo to use after or other delay option with matcher? Something similar to: VerificationAfterDelay
For now I combined it with expectations but I am not sure whether it's the best way.
func test() {
let exp = expectation(description: "testShow")
exp.expectedFulfillmentCount = 1
delay(1.0) { // async after
verify(view).show()
exp.fulfill() // always fulfill
}
wait(for: [exp], timeout: 2.0)
}
USE CASE:
I wanted to test whether some methods were invoked in Presenter which used Timer. I could of course mock this Timer as it is usually done with API requests but for such simple scenario I think delay in verify would be better.
Regards
Metadata
Metadata
Assignees
Labels
enhancementgood first issueIf you're looking to contribute, this issue is the way to go!If you're looking to contribute, this issue is the way to go!