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
@Test | |
fun clickOnAndroidHomeIcon_OpensNavigationAndLogOut() { | |
// Check that left drawer is closed at startup | |
onView(withId(R.id.drawer_layout)) | |
.check(matches(isClosed(Gravity.LEFT))) | |
// Open Drawer | |
onView(withId(R.id.drawer_layout)).perform(DrawerActions.open()) | |
// Check if drawer is open |
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
Started running tests | |
java.lang.IllegalArgumentException: No injector factory bound for Class<com.shop.app.main.MainActivity> | |
at dagger.android.DispatchingAndroidInjector.inject(DispatchingAndroidInjector.java:104) | |
at com.shop.app.main.MainActivityTest$activityTestRule$1$beforeActivityLaunched$$inlined$MockAndroidInjectorActivity$1.inject(TestUtils.kt:21) | |
at com.shop.app.main.MainActivityTest$activityTestRule$1$beforeActivityLaunched$$inlined$MockAndroidInjectorActivity$1.inject(Unknown Source:2) | |
at dagger.android.DispatchingAndroidInjector.maybeInject(DispatchingAndroidInjector.java:81) | |
at dagger.android.DispatchingAndroidInjector.inject(DispatchingAndroidInjector.java:102) | |
at dagger.android.AndroidInjection.inject(AndroidInjection.java:59) |
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
.IllegalArgumentException: No injector factory bound for Class<com.shop.app.main.MainActivity> | |
at dagger.android.DispatchingAndroidInjector.inject(DispatchingAndroidInjector.java:104) | |
at com.shop.app.main.MainActivityTest$activityTestRule$1$beforeActivityLaunched$$inlined$MockAndroidInjectorActivity$1.inject(TestUtils.kt:21) | |
at com.shop.app.main.MainActivityTest$activityTestRule$1$beforeActivityLaunched$$inlined$MockAndroidInjectorActivity$1.inject(Unknown Source:2) | |
at dagger.android.DispatchingAndroidInjector.maybeInject(DispatchingAndroidInjector.java:81) | |
at dagger.android.DispatchingAndroidInjector.inject(DispatchingAndroidInjector.java:102) | |
at dagger.android.AndroidInjection.inject(AndroidInjection.java:59) | |
at dagger.android.support.DaggerAppCompatActivity.onCreate(DaggerAppCompatActivity.java:43) | |
at com.shop.app.common.BaseActivity.onCreate(BaseActivity.java:85) | |
at android.app.Activity.performCreate(Activity.java:6999) |
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
@get:Rule | |
val activityTestRule = object : IntentsTestRule<MainActivity>(MainActivity::class.java, true, | |
true) { | |
override fun beforeActivityLaunched() { | |
super.beforeActivityLaunched() | |
var myApp = InstrumentationRegistry.getTargetContext().applicationContext as HarvestOrderApp | |
myApp.dispatchingActivityInjector = MockAndroidInjectorFragment<BuyerOrdersListFragment, MainActivity> { | |
this.mPresenterFactory = ordersPresenterFactors |
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
public abstract class BaseActivity<P extends BasePresenter<V>, V> extends DaggerAppCompatActivity | |
implements LoaderManager.LoaderCallbacks<P> { | |
... | |
public @Inject DispatchingAndroidInjector<Fragment> fragmentInjector; | |
@Override public AndroidInjector<Fragment> supportFragmentInjector() { | |
if (fragmentInjector != null) return fragmentInjector; | |
return super.supportFragmentInjector(); | |
} | |
... | |
} |
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
version: 2.0 | |
defaults: &defaults | |
working_directory: ~/code | |
docker: | |
- image: circleci/android:api-27-alpha | |
environment: | |
_JAVA_OPTIONS: "-Xmx3200m -XX:ParallelGCThreads=2 -XX:ConcGCThreads=2 -XX:ParallelGCThreads=2 -Djava.util.concurrent.ForkJoinPool.common.parallelism=2" | |
TERM: dumb |
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
@Module public abstract class ActivityBindingModule { | |
@ActivityScoped @ContributesAndroidInjector(modules = MainModule.class) | |
abstract MainActivity mainActivity(); | |
} |
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
// Top-level build file where you can add configuration options common to all sub-projects/modules. | |
buildscript { | |
repositories { | |
jcenter() | |
maven { | |
url 'https://maven.google.com/' | |
name 'Google' | |
} | |
} |
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
Start Ups/Business: | |
Thinking, Fast and Slow by Daniel Kahneman | |
The Four Steps to the Epiphany by Steve Blank | |
The Art of the Start: The Time-Tested, Battle-Hardened Guide for Anyone Starting Anything by Guy Kawasaki | |
Founders at Work: Stories of Startups' Early Days by Jessica Livingston | |
The Lean Startup: How Today's Entrepreneurs Use Continuous Innovation to Create Radically Successful Businesses by Eric Ries | |
Rework by 37signals | |
The E-Myth Revisited: Why Most Small Businesses Don't Work and What to Do About It by Michael Gerber | |
The Black Swan: Second Edition: The Impact of the Highly Improbable: With a new section: "On Robustness and Fragility" (Incerto) by Nassim Nicholas Taleb | |
Delivering Happiness: A Path to Profits, Passion, and Purpose by Tony Hsieh |