Code example for WifiManager

Methods: isWifiEnabled

0
    } 
 
    @Test(expected = SecurityException.class) 
    public void isWifiEnabled_shouldThrowSecurityExceptionWhenAccessWifiStatePermissionNotGranted() throws Exception { 
        shadowWifiManager.setAccessWifiStatePermission(false);
        wifiManager.isWifiEnabled();
    } 
 
    @Test(expected = SecurityException.class) 
    public void getConnectionInfo_shouldThrowSecurityExceptionWhenAccessWifiStatePermissionNotGranted() throws Exception { 
        shadowWifiManager.setAccessWifiStatePermission(false);
        wifiManager.getConnectionInfo();
    } 
 
}