Search in sources :

Example 6 with FakeAction

use of com.squareup.picasso3.TestUtils.FakeAction in project picasso by square.

the class PicassoTest method completeWithReplayDoesNotRemove.

@Test
public void completeWithReplayDoesNotRemove() {
    FakeAction action = mockAction(URI_KEY_1, URI_1, mockImageViewTarget());
    action.willReplay = true;
    BitmapHunter hunter = mockHunter(new RequestHandler.Result.Bitmap(bitmap, MEMORY), action);
    hunter.run();
    picasso.enqueueAndSubmit(action);
    assertThat(picasso.targetToAction).hasSize(1);
    picasso.complete(hunter);
    assertThat(picasso.targetToAction).hasSize(1);
    verifyActionComplete(action);
}
Also used : FakeAction(com.squareup.picasso3.TestUtils.FakeAction) Test(org.junit.Test)

Aggregations

FakeAction (com.squareup.picasso3.TestUtils.FakeAction)6 Test (org.junit.Test)6