Code example for WifiManager

Methods: getConnectionInfo

0
    shadowWifiManager = shadowOf(wifiManager);
  } 
 
  @Test 
  public void shouldReturnWifiInfo() { 
    assertEquals(wifiManager.getConnectionInfo().getClass(), WifiInfo.class);
  } 
 
  @Test(expected = SecurityException.class) 
  public void setWifiEnabled_shouldThrowSecurityExceptionWhenAccessWifiStatePermissionNotGranted() throws Exception { 
    shadowWifiManager.setAccessWifiStatePermission(false);
    wifiManager.setWifiEnabled(true);
  } 
 
  @Test(expected = SecurityException.class) 
  public void isWifiEnabled_shouldThrowSecurityExceptionWhenAccessWifiStatePermissionNotGranted() throws Exception { 
    shadowWifiManager.setAccessWifiStatePermission(false);
    wifiManager.isWifiEnabled();
  } 
 
  @Test(expected = SecurityException.class)