JUnit4RulesContext
A context for a test-level fixture handling JUnit 4 rules.
Each JUnit 4 TestRule registered in this context via the rule method will be applied to a test.
Usage:
testFixture {
object : JUnit4RulesContext() {
val composeTestRule = rule(createComposeRule())
// other rules or regular properties...
}
} asContextForEach {
test("setup") {
composeTestRule.setContent {
ComposableUnderTest()
}
}
}Content copied to clipboard