@Test public void invokesOnBitmapFailedIfTargetIsNotNullWithErrorDrawable() throws Exception { Drawable errorDrawable = mock(Drawable.class); Target target = mockTarget(); TargetAction request = new TargetAction(mock(Picasso.class), target, null, 0, 0, errorDrawable, URI_KEY_1, null, 0); Exception e = new RuntimeException(); request.error(e); verify(target).onBitmapFailed(e, errorDrawable); }
@Override void error(Exception e) { Target target = getTarget(); if (target != null) { if (errorResId != 0) { target.onBitmapFailed(e, picasso.context.getResources().getDrawable(errorResId)); } else { target.onBitmapFailed(e, errorDrawable); } } }
TargetAction extends Action<Target> { @Override void error(Exception e) { Target target = getTarget(); if (target != null) { if (errorResId != 0) { target.onBitmapFailed(e, picasso.context.getResources().getDrawable(errorResId)); } else { target.onBitmapFailed(e, errorDrawable); } } } }
TargetAction extends Action<Target> { @Override void error(Exception e) { Target target = getTarget(); if (target != null) { if (errorResId != 0) { target.onBitmapFailed(e, picasso.context.getResources().getDrawable(errorResId)); } else { target.onBitmapFailed(e, errorDrawable); } } } TargetAction(Picasso picasso, Target target, Request data, int memoryPolicy, int networkPolicy,
      Drawable errorDrawable, String key, Object tag, int errorResId); }
TargetAction extends Action<Target> { @Override void error(Exception e) { Target target = getTarget(); if (target != null) { if (errorResId != 0) { target.onBitmapFailed(e, picasso.context.getResources().getDrawable(errorResId)); } else { target.onBitmapFailed(e, errorDrawable); } } } TargetAction(Picasso picasso, Target target, Request data, int memoryPolicy, int networkPolicy,
      Drawable errorDrawable, String key, Object tag, int errorResId);  }
TargetAction extends Action<Target> { @Override void error(Exception e) { Target target = getTarget(); if (target != null) { if (errorResId != 0) { target.onBitmapFailed(e, picasso.context.getResources().getDrawable(errorResId)); } else { target.onBitmapFailed(e, errorDrawable); } } } TargetAction(Picasso picasso, Target target, Request data, int memoryPolicy, int networkPolicy,
      Drawable errorDrawable, String key, Object tag, int errorResId);   }