I'm a bit confused regardning the documentation an...
# kotest
m
I'm a bit confused regardning the documentation and deprecation strategies for
Extension
and
Listener
.
Listener
is deprecated in favor of
Extension
, but the documentation for
Extension
promotes
Listener
. I also don't follow the
@SoftDeprecated("Use beforeAny")
on the
BeforeTestListener
. I mean, I follow/understand the same annotation on
beforeTest
, but I don't get why it's on the interface itself.
s
I think just a documentation issue. Extension is a superset of Listener. Even things like BeforeTestListener are extensions.
As for beforeTest, you can use it, it's never going to be removed.
m
Right, so
BeforeTestListener
(and friends) is still the way to go, even though it extends the deprecated
Listener
interface? And the soft deprecation on the interface itself (
BeforeTestListener
) should possibly be removed (it doesn't really make sense, or am I missing something?)
s
The soft deprecation just means, we're preferring the name beforeAny, but beforeTest is never going away.
I may remove that soft deprecation entirely
And BeforeTestListener is an extension, the name Listener will remain, but there is no longer any functional difference between listeners and extensions
m
Gotcha, thanks!