Created
October 13, 2015 14:28
-
-
Save patrykpoborca/0e7063c17dfaac7bc49f to your computer and use it in GitHub Desktop.
This file contains hidden or 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
public class MainActivityPresenterTestOptionTwo implements IMainActivity { | |
private static final String SOME_MOCKED_MESSAGE = "Some Mocked Message"; | |
private MockedResources resources; | |
private MainActivityPresenter mainActivityPresenter; | |
@Before | |
public void setup(){ | |
resources = new MockedResources(); | |
mainActivityPresenter = new MainActivityPresenter(); | |
mainActivityPresenter.registerPresenterView(this); | |
mainActivityPresenter.setResources(resources); | |
} | |
@Test | |
public void testToastMessage(){ | |
resources.addString(R.string.hello_world, SOME_MOCKED_MESSAGE); | |
mainActivityPresenter.fabClicked(); | |
} | |
@Override | |
public void showToast(String message) { | |
Assert.assertTrue(SOME_MOCKED_MESSAGE.equals(message)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment