@Test public void generateUrlString_needsButDoesNotHaveReadPhoneState_shouldNotContainOperatorName() { shadowTelephonyManager.setNeedsReadPhoneState(true); shadowTelephonyManager.setReadPhoneStatePermission(false); shadowTelephonyManager.setNetworkOperatorName("TEST_CARRIER"); subject = new NativeUrlGenerator(context).withAdUnitId(AD_UNIT_ID); String requestString = generateMinimumUrlString(); assertThat(getNetworkOperatorNameFromRequestUrl(requestString)).isNullOrEmpty(); }
@NonNull @Override public NativeUrlGenerator withAdUnitId(final String adUnitId) { mAdUnitId = adUnitId; return this; }
NativeUrlGenerator extends AdUrlGenerator { @NonNull @Override public NativeUrlGenerator withAdUnitId(final String adUnitId) { mAdUnitId = adUnitId; return this; } }
NativeUrlGenerator extends AdUrlGenerator { @NonNull @Override public NativeUrlGenerator withAdUnitId(final String adUnitId) { mAdUnitId = adUnitId; return this; } NativeUrlGenerator(Context context); }
NativeUrlGenerator extends AdUrlGenerator { @NonNull @Override public NativeUrlGenerator withAdUnitId(final String adUnitId) { mAdUnitId = adUnitId; return this; } NativeUrlGenerator(Context context); @NonNull @Override NativeUrlGenerator withAdUnitId(final String adUnitId); @Override String generateUrlString(final String serverHostname); }
NativeUrlGenerator extends AdUrlGenerator { @NonNull @Override public NativeUrlGenerator withAdUnitId(final String adUnitId) { mAdUnitId = adUnitId; return this; } NativeUrlGenerator(Context context); @NonNull @Override NativeUrlGenerator withAdUnitId(final String adUnitId); @Override String generateUrlString(final String serverHostname);  }