Created
May 8, 2015 10:41
-
-
Save kmdupr33/54d1b6a42139dcae8c2e to your computer and use it in GitHub Desktop.
Showing how we can control SessionDetailPresenter pre-act-state by injecting a mock SessionRepositoryManager
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.google.samples.apps.iosched.ui.sessiondetail; | |
import android.os.Bundle; | |
import com.google.samples.apps.iosched.io.model.Session; | |
/** | |
* Created by MattDupree on 5/8/15. | |
*/ | |
public class MockSessionRepositoryManager implements SessionRepositoryManager{ | |
private Session mSession; | |
public MockSessionRepositoryManager(Session session) { | |
mSession = session; | |
} | |
@Override | |
public void initRepository(int id, Bundle bundle, | |
SessionRepositoryManagerCallbacks repositoryManagerCallbacks) { | |
repositoryManagerCallbacks.onLoadFinished(mSession); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment