Emil Kantis
04/17/2023, 8:49 PMinline infix fun <reified T> (() -> T).shouldReturn(expected: T) = this() shouldBe expected
worth adding?mitch
04/20/2023, 9:48 AMrun { ... } shouldBe expected
Emil Kantis
04/20/2023, 5:26 PMPair<Int, () -> String>
using something like
items.forOne {
it.first shouldBe 5
it.second shouldReturn "hello"
}
I made some custom matchers later on so it's a non-issue for me now.. anyway.. you're right, I could've done this. 🙂
items.forOne {
it.first shouldBe 5
run(it.second) shouldBe "hello"
}
or just it.second() shouldBe "hello"