use of android.net.NetworkKey in project platform_frameworks_base by android.
the class WifiNetworkScoreCacheTest method getMeteredHintShouldReturnTrue.
@Test
public void getMeteredHintShouldReturnTrue() {
ScoredNetwork network = new ScoredNetwork(new NetworkKey(VALID_KEY), mockRssiCurve, true);
mScoreCache.updateScores(ImmutableList.of(network));
assertTrue(mScoreCache.getMeteredHint(VALID_SCAN_RESULT));
}
use of android.net.NetworkKey in project platform_frameworks_base by android.
the class NetworkScoreServiceTest method testRequestScores_providerThrowsRemoteException.
@Test
public void testRequestScores_providerThrowsRemoteException() throws Exception {
injectProvider();
doThrow(new RemoteException()).when(mRecommendationProvider).requestScores(any(NetworkKey[].class));
assertFalse(mNetworkScoreService.requestScores(new NetworkKey[0]));
}
Aggregations