What is the new preferred approach to running code before and after activity finishes with ActivityScenarioRule?

146 views Asked by At

Previously with ActivityTestRule, one was able to override beforeActivityLaunched and afterActivityFinished to control app state before and after all tests (e.g, implementing a custom rule Class that extended ActivityTestRule that would be used in all tests). With ActivityScenarioRule marked final and without these protected methods, where/how is this logic now moved to with regard to how one controls before and after an activity? What's the recommended approach now if one were to write a custom rule to be applied to all tests?

0

There are 0 answers