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
@RunWith(JUnit4.class) | |
public class MVVMTest { | |
private static final String SOME_URL = "SOME_URL"; | |
private static final String USER_PASSWORD = "USER_PASSWORD"; | |
private static final String USER_NAME = "USER_NAME"; | |
private String tweetedTweet; | |
@Inject | |
MainViewModel viewModel; |
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
@RunWith(JUnit4.class) | |
public class MVPTest { | |
private static final String SOME_URL = "SOME_URL"; | |
private static final String USER_PASSWORD = "USER_PASSWORD"; | |
private static final String USER_NAME = "USER_NAME"; | |
@Inject | |
MockTweeterActivityPview pView; |
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 MockTweeterActivityPview implements TweeterMVPPView { | |
public String fetchedTweet = null; | |
public List<String> previousTweets = null; | |
public boolean setUserButtonTextCalled = false; | |
public boolean toggleProgressBarCalled = false; | |
public boolean toggleLoginContainerCalled = false; | |
public String displayWebpage = null; | |
public boolean displayToastCalled = false; |
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
<android.support.design.widget.AppBarLayout | |
android:id="@+id/appbar" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content"> | |
<SomeView | |
android:id="@+id/epoints_header" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
app:layout_scrollFlags="enterAlways|scroll" |
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 MyClass <T extends String> { | |
@Inject | |
@Named("MyObject")Object object; | |
} |
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
@Component(modules = MyModule.class) | |
public interface MyComponent { | |
public void inject(MyClass myClass); | |
} |
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
@Module | |
public class MyModule { | |
@Named("MyObject") | |
@Provides | |
Object providesMyObject(){ | |
return null; | |
} | |
} |
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
@Component(modules = MyModule.class) | |
public interface MyComponent { | |
public void inject(MyClass<String> myClass); | |
} |
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 BasePresenter<T extends BasePresenterView> { | |
private T presenterView; | |
private UtilityWrapper utilityWrapper; | |
public BasePresenter() { | |
utilityWrapper = new UtilityWrapper(); | |
DaggerActivityComponent.builder() | |
.baseComponent(PSAApplication.getBaseComponent()) | |
.build() |
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 UtilityWrapper { | |
@Inject | |
Lazy<StringFormatter> lazyStringFormatter; | |
@Inject | |
Lazy<Scheduler> lazyMainScheduler; | |
public StringFormatter getStringFormatter() { | |
return lazyStringFormatter.get(); |