// Path: app/src/androidTest/java/com/jonathanpetitfrere/mvvm/TestApplication.java
// public class TestApplication extends MvvmApplication {
// 
//     public void setAppGraph(AppGraph appGraph) {
//         this.component = appGraph;
//     }
// 
// }
// 
// Path: app/src/androidTest/java/com/jonathanpetitfrere/mvvm/di/TestComponent.java
// @Singleton
// @Component(modules = {
//         ApplicationModule.class,
//         ApiModule.class,
//         RepositoryModule.class
// })
// public interface TestComponent extends AppGraph {
// 
//     final class Initializer {
// 
//         public static TestComponent init(Application application) {
// 
//             return DaggerTestComponent.builder()
//                     .applicationModule(new TestApplicationModule(application))
//                     .repositoryModule(new TestRepositoryModule())
//                     .apiModule(new TestApiModule())
//                     .build();
//         }
//     }
// 
// }


import android.support.test.InstrumentationRegistry;
import android.support.test.rule.ActivityTestRule;
import android.support.test.runner.AndroidJUnit4;
import android.widget.Button;
import com.jonathanpetitfrere.mvvm.R;
import com.jonathanpetitfrere.mvvm.TestApplication;
import com.jonathanpetitfrere.mvvm.di.TestComponent;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import static android.support.test.espresso.Espresso.onView;
import static android.support.test.espresso.action.ViewActions.click;
import static android.support.test.espresso.action.ViewActions.typeText;
import static android.support.test.espresso.matcher.ViewMatchers.withId;
import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.assertFalse;
import static junit.framework.Assert.assertTrue;
package com.jonathanpetitfrere.mvvm.ui.main;





/**
 * @author jpetit
 */

@RunWith(AndroidJUnit4.class)
public class MainActivityTest {

    @Rule
    public final ActivityTestRule<MainActivity> activityTestRule = new ActivityTestRule<>(MainActivity.class, false, false);

    @Before
    public void setup() {
// Path: app/src/androidTest/java/com/jonathanpetitfrere/mvvm/TestApplication.java
// public class TestApplication extends MvvmApplication {
// 
//     public void setAppGraph(AppGraph appGraph) {
//         this.component = appGraph;
//     }
// 
// }
// 
// Path: app/src/androidTest/java/com/jonathanpetitfrere/mvvm/di/TestComponent.java
// @Singleton
// @Component(modules = {
//         ApplicationModule.class,
//         ApiModule.class,
//         RepositoryModule.class
// })
// public interface TestComponent extends AppGraph {
// 
//     final class Initializer {
// 
//         public static TestComponent init(Application application) {
// 
//             return DaggerTestComponent.builder()
//                     .applicationModule(new TestApplicationModule(application))
//                     .repositoryModule(new TestRepositoryModule())
//                     .apiModule(new TestApiModule())
//                     .build();
//         }
//     }
// 
// }


// Path: app/src/androidTest/java/com/jonathanpetitfrere/mvvm/ui/main/MainActivityTest.java
import android.support.test.InstrumentationRegistry;
import android.support.test.rule.ActivityTestRule;
import android.support.test.runner.AndroidJUnit4;
import android.widget.Button;
import com.jonathanpetitfrere.mvvm.R;
import com.jonathanpetitfrere.mvvm.TestApplication;
import com.jonathanpetitfrere.mvvm.di.TestComponent;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import static android.support.test.espresso.Espresso.onView;
import static android.support.test.espresso.action.ViewActions.click;
import static android.support.test.espresso.action.ViewActions.typeText;
import static android.support.test.espresso.matcher.ViewMatchers.withId;
import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.assertFalse;
import static junit.framework.Assert.assertTrue;

package com.jonathanpetitfrere.mvvm.ui.main;





/**
 * @author jpetit
 */

@RunWith(AndroidJUnit4.class)
public class MainActivityTest {

    @Rule
    public final ActivityTestRule<MainActivity> activityTestRule = new ActivityTestRule<>(MainActivity.class, false, false);

    @Before
    public void setup() {
        TestApplication application = ((TestApplication) InstrumentationRegistry.getTargetContext().getApplicationContext());