@Test public void generateUrlString_withOnlyAdUnitSet_shouldReturnMinimumUrl() { subject = new NativeUrlGenerator(context).withAdUnitId(AD_UNIT_ID); final String adUrl = generateMinimumUrlString(); assertThat(adUrl).isEqualTo( "http: AD_UNIT_ID + "&nsv=" + MoPub.SDK_VERSION + "&dn=unknown%2Cunknown%2Cunknown" + "&bundle=testBundle" + "&z=-0700" + "&o=u" + "&w=" + TEST_SCREEN_WIDTH + "&h=" + TEST_SCREEN_HEIGHT + "&sc_a=" + TEST_DENSITY + "&ct=3&av=1.0" + "&udid=mp_tmpl_advertising_id&dnt=mp_tmpl_do_not_track"); }
@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);  }