commit | 370447a2b8f95e3b2690550af8ddfc212f0c9dfd | [log] [tgz] |
---|---|---|
author | Remi NGUYEN VAN <reminv@google.com> | Thu Dec 08 15:05:31 2022 +0900 |
committer | Remi NGUYEN VAN <reminv@google.com> | Thu Dec 08 15:07:07 2022 +0900 |
tree | 1b47c3623374362c2ecb1b202c95c04aaee46ba8 | |
parent | 01e4a445d5577c4fc2d47c70bf69f5d037e5f73e [diff] |
Do not use mock(WifiManager.class) in tests mock(WifiManager.class) will throw a ClassNotFoundException on R when a newer wifi module is installed, because newer methods were added that reference classes that do not exist on R. This means that as it is, it is no longer possible to mock WifiManager with Mockito. Mock the only method usage using a different method. Bug: 256774041 Test: atest Change-Id: I0f86c45d3f25ac2df4ede70f8b86845e575f5eb9