An idea, for tasks again: I check .is success() bu...
# strikt
c
An idea, for tasks again: I check .is success() but as they have the BuildCache enabled they can be .isFromCache() and I don't like the idea of saying .not().isFailure() ,I wanted to do something like: .any( Success, FromCache) but I don't know how to do it
or even UpToDate
but I don't want to have for example a skipped
r
hmm, that’s a good idea. I didn’t actually implement the Gradle module (it was contributed by another user). That’s probably straightforward enough I can implement it, though
c
So far I've added an extension method .isSuccesfulOrCached() (it does assert the outcome is success, fromCache or up-to-date, but I didn't think of a better name)
r
I just added
Assertion.Builder<Enum<T>>.isOneOf(vararg T)
which you could use:
Copy code
expectThat(task).outcome.isOneOf(SUCCESS, FROM_CACHE)
❤️ 2