lundi 1 août 2016

How do you call Robolectric's ShadowWifiManager.setScanResults()?

During testing, I need to make the WifiManager.getScanResults() method return a non-empty list. I'm using Robolectric. I found the ShadowWifiManager has a setScanResults() method, that takes a list of ScanResult objects -- but they don't have a public constructor.

Aucun commentaire:

Enregistrer un commentaire