groostav
10/17/2019, 4:05 AMCloseable
.close()
not called style bugs. Unfortunately idiomatically using .use{}
or try-finally (or, RAII had i been on C++) is not possible, because these close()
calls relate to UI elements on binding logic.
There are some fairly simple assertions I can make. "Given a ui component X has a constructor annotated with @Inject
, and that constructor has members Y that themselves have a dispose()
method, then calling X.dispose()
should call Y.foreach { it.dispose() }
.
Anyone have ideas on how I might write a test-harness to let me quickly do that, instead of manually creating mocks and verifying behaviours etc?