shadows/framework/src/main/java/org/robolectric/shadows/ShadowNetworkInfo.java
public static NetworkInfo newInstance(
      NetworkInfo.DetailedState detailedState,
      int type,
      int subType,
      boolean isAvailable,
      NetworkInfo.State state) {
    NetworkInfo networkInfo = Shadow.newInstanceOf(NetworkInfo.class);
    final ShadowNetworkInfo info = Shadow.extract(networkInfo);
    info.setConnectionType(type);
    info.setSubType(subType);
    info.setDetailedState(detailedState);
    info.setAvailableStatus(isAvailable);
    info.setConnectionStatus(state);
    return networkInfo;
  }
public static NetworkInfo newInstance(
      NetworkInfo.DetailedState detailedState,
      int type,
      int subType,
      boolean isAvailable,
      NetworkInfo.State state) {
    NetworkInfo networkInfo = Shadow.newInstanceOf(NetworkInfo.class);
    final ShadowNetworkInfo info = Shadow.extract(networkInfo);
    info.setConnectionType(type);
    info.setSubType(subType);
    info.setDetailedState(detailedState);
    info.setAvailableStatus(isAvailable);
    info.setConnectionStatus(state);
    return networkInfo;
  }
public static NetworkInfo newInstance ( NetworkInfo . DetailedState detailedState , int type , int subType , boolean isAvailable , NetworkInfo . State state ) { NetworkInfo networkInfo = Shadow . newInstanceOf ( NetworkInfo . class ) ; final ShadowNetworkInfo info = Shadow . extract ( networkInfo ) ; info . setConnectionType ( type ) ; info . setSubType ( subType ) ; info . setDetailedState ( detailedState ) ; info . setAvailableStatus ( isAvailable ) ; info . setConnectionStatus ( state ) ; return networkInfo ; }
Allows developers to create a {@link NetworkInfo} instance for testing.
Allows developers to create a {