Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit a1aaccf6 authored by Jeremy Goldman's avatar Jeremy Goldman
Browse files

[Testing] use AndroidJUnit4 in new MultiNetworkHeaderControllerTest

1. Rather than mocking the PreferenceScreen, create an instance via
PreferenceManager. Rather than stubbing PreferenceScreen functions to
return the PreferenceCategory mock, the mock is inserted using public
functions.
2. PreferenceCategory active state is checked rather than verifying the
arguments of function calls.
3. mHeaderController test superclass overrides functions which use the
Lifecycle, because doReturn+when on Spy objects has undesired side
effects.
4. Looper message queue prepared for the PreferenceScreen.

Bug: 168130550
Diff: https://diff.googleplex.com/#key=w7a7L3seOowE
Test: atest -c MultiNetworkHeaderControllerTest
Change-Id: Ic66425aca4047d2eacd04509f3bfb315f6dd57fc
parent 7b8b881f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment