https://kotlinlang.org logo
#test
Title
# test
r

Rak

04/01/2022, 9:48 AM
Hi, I am writing some unit tests for an
object
class. Is there a way to “reset” the instance? It keeps its state between tests.
m

Matthias Geisler

04/01/2022, 11:12 AM
I guess you look for something like
@BeforeTest
or
@AfterTest
m

Mykola Gurov

04/01/2022, 1:24 PM
no, stateful objects aren't resettable unless expose methods to reset which in turn could be hooked into your test setup
4 Views