Is there any way to avoid calling `setContent` mul...
# compose-desktop
t
Is there any way to avoid calling
setContent
multiple times (compose testing) 🧵 ?
As you can see, everytime I run the test, I've to
setContent
. Is there any way I can implement something like
@BeforeAll
/
@BeforeClass
in this test?
z
Just put it in a
@Before
method. I think the compose testing docs even recommend that pattern.
✔️ 1
t
so we've to call
composeRule.setContent
for every test? 🤔 no way to call it only once (since the rest of the test will be based on the same tree)?
am just curious
z
Yes, the function has to be executed for every test, because the rule object is created anew for every test. But why do you care?