// Path: app/src/androidTest/java/com/ragdroid/dahaka/DahakaTestApplication.java
// public class DahakaTestApplication extends DahakaApplication {
// 
//     public TestComponent getTestComponent() {
//         return testComponent;
//     }
// 
//     private TestComponent testComponent;
// 
//     @Override
//     protected void createComponent() {
//         testComponent = DaggerTestComponent.builder().application(this).build();
//         testComponent.inject(this);
//     }
// 
// }
// 
// Path: app/src/main/java/com/ragdroid/dahaka/activity/AppBindingModule.java
// @Module(subcomponents = UserComponent.class)
// public abstract class AppBindingModule {
// 
//     @ContributesAndroidInjector(modules = LoginModule.class)
//     @ActivityScope
//     abstract LoginActivity loginActivity();
// }
// 
// Path: app/src/androidTest/java/com/ragdroid/dahaka/activity/login/LoginActivityTest.java
// @RunWith(AndroidJUnit4.class)
// public class LoginActivityTest {
// 
//     @Inject
//     PokemonService service;
// 
//     @Inject
//     TestScheduler testScheduler;
// 
//     @Rule
//     public ActivityTestRule<LoginActivity> activityRule = new ActivityTestRule<>(
//             LoginActivity.class, true);
// 
//     @Before
//     public void setUp() throws Exception {
//         Instrumentation instrumentation = InstrumentationRegistry.getInstrumentation();
//         DahakaTestApplication app
//                 = (DahakaTestApplication) instrumentation.getTargetContext().getApplicationContext();
//         TestComponent component = (TestComponent) app.getTestComponent();
//         component.inject(this);
//     }
// 
//     @Test
//     public void testOne() throws InterruptedException {
//         when(service.getPokemon("pikachu")).thenReturn(Single.just(TestDataFactory.getDummyPokemon()));
//         LoginActivity loginActivity = activityRule.launchActivity(new Intent());
//         onView(withId(R.id.login_input)).perform(typeText("pikachu"), closeSoftKeyboard());
// 
//         onView(withId(R.id.login_submit_button))
//                 .perform(click());
//         testScheduler.triggerActions();
//         onView(withText("Login Successful"))
//                 .inRoot(withDecorView(not(is(loginActivity.getWindow().getDecorView()))))
//                 .check(matches(isDisplayed()));
// 
// 
//     }
// 
// }
// 
// Path: app/src/androidTest/java/com/ragdroid/dahaka/api/MockApiModule.java
// @Module
// public class MockApiModule {
// 
//     @Provides
//     @Singleton
//     static PokemonService providePokemonService() {
//         return Mockito.mock(PokemonService.class);
//     }
// 
// 
// }


import android.app.Application;
import com.ragdroid.dahaka.DahakaTestApplication;
import com.ragdroid.dahaka.activity.AppBindingModule;
import com.ragdroid.dahaka.activity.login.LoginActivityTest;
import com.ragdroid.dahaka.api.MockApiModule;
import javax.inject.Singleton;
import dagger.BindsInstance;
import dagger.Component;
import dagger.android.support.AndroidSupportInjectionModule;
package com.ragdroid.dahaka.app;





/**
 * Created by garimajain on 28/08/17.
 */
@Singleton
@Component(modules = {
        MockAppModule.class,
// Path: app/src/androidTest/java/com/ragdroid/dahaka/DahakaTestApplication.java
// public class DahakaTestApplication extends DahakaApplication {
// 
//     public TestComponent getTestComponent() {
//         return testComponent;
//     }
// 
//     private TestComponent testComponent;
// 
//     @Override
//     protected void createComponent() {
//         testComponent = DaggerTestComponent.builder().application(this).build();
//         testComponent.inject(this);
//     }
// 
// }
// 
// Path: app/src/main/java/com/ragdroid/dahaka/activity/AppBindingModule.java
// @Module(subcomponents = UserComponent.class)
// public abstract class AppBindingModule {
// 
//     @ContributesAndroidInjector(modules = LoginModule.class)
//     @ActivityScope
//     abstract LoginActivity loginActivity();
// }
// 
// Path: app/src/androidTest/java/com/ragdroid/dahaka/activity/login/LoginActivityTest.java
// @RunWith(AndroidJUnit4.class)
// public class LoginActivityTest {
// 
//     @Inject
//     PokemonService service;
// 
//     @Inject
//     TestScheduler testScheduler;
// 
//     @Rule
//     public ActivityTestRule<LoginActivity> activityRule = new ActivityTestRule<>(
//             LoginActivity.class, true);
// 
//     @Before
//     public void setUp() throws Exception {
//         Instrumentation instrumentation = InstrumentationRegistry.getInstrumentation();
//         DahakaTestApplication app
//                 = (DahakaTestApplication) instrumentation.getTargetContext().getApplicationContext();
//         TestComponent component = (TestComponent) app.getTestComponent();
//         component.inject(this);
//     }
// 
//     @Test
//     public void testOne() throws InterruptedException {
//         when(service.getPokemon("pikachu")).thenReturn(Single.just(TestDataFactory.getDummyPokemon()));
//         LoginActivity loginActivity = activityRule.launchActivity(new Intent());
//         onView(withId(R.id.login_input)).perform(typeText("pikachu"), closeSoftKeyboard());
// 
//         onView(withId(R.id.login_submit_button))
//                 .perform(click());
//         testScheduler.triggerActions();
//         onView(withText("Login Successful"))
//                 .inRoot(withDecorView(not(is(loginActivity.getWindow().getDecorView()))))
//                 .check(matches(isDisplayed()));
// 
// 
//     }
// 
// }
// 
// Path: app/src/androidTest/java/com/ragdroid/dahaka/api/MockApiModule.java
// @Module
// public class MockApiModule {
// 
//     @Provides
//     @Singleton
//     static PokemonService providePokemonService() {
//         return Mockito.mock(PokemonService.class);
//     }
// 
// 
// }


// Path: app/src/androidTest/java/com/ragdroid/dahaka/app/TestComponent.java
import android.app.Application;
import com.ragdroid.dahaka.DahakaTestApplication;
import com.ragdroid.dahaka.activity.AppBindingModule;
import com.ragdroid.dahaka.activity.login.LoginActivityTest;
import com.ragdroid.dahaka.api.MockApiModule;
import javax.inject.Singleton;
import dagger.BindsInstance;
import dagger.Component;
import dagger.android.support.AndroidSupportInjectionModule;

package com.ragdroid.dahaka.app;





/**
 * Created by garimajain on 28/08/17.
 */
@Singleton
@Component(modules = {
        MockAppModule.class,
        MockApiModule.class,