// Path: presentation/src/main/java/presentation/foundation/BaseApp.java
// public class BaseApp extends Application {
//     private ApplicationComponent applicationComponent;
// 
//     @Override public void onCreate() {
//         super.onCreate();
//         initInject();
//         AppCare.YesSir.takeCareOn(this);
//     }
// 
//     private void initInject() {
//         applicationComponent = DaggerApplicationComponent.builder()
//                 .applicationModule(new ApplicationModule(this))
//                 .build();
//     }
// 
//     public ApplicationComponent getApplicationComponent() {
//         return applicationComponent;
//     }
// 
//     @Nullable public BaseFragmentActivity getLiveActivity(){
//         return (BaseFragmentActivity) AppCare.YesSir.getLiveActivityOrNull();
//     }
// }
// 
// Path: presentation/src/main/java/presentation/sections/launch/LaunchActivity.java
// public class LaunchActivity extends BaseFragmentActivity implements LaunchView {
//     @Inject protected LaunchPresenter launchPresenter;
// 
//     @Override protected void injectDagger() {
//         getApplicationComponent().inject(this);
//     }
// 
//     @Override protected void initViews() {
//         super.initViews();
//         launchPresenter.attachView(this);
//     }
// }


import android.app.Activity;
import android.support.test.InstrumentationRegistry;
import android.support.test.rule.ActivityTestRule;
import android.support.test.runner.AndroidJUnit4;
import com.squareup.spoon.Spoon;
import org.junit.Before;
import org.junit.Rule;
import org.junit.runner.RunWith;
import presentation.foundation.BaseApp;
import presentation.sections.launch.LaunchActivity;
/*
 * Copyright 2015 RefineriaWeb
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package presentation.common;





@RunWith(AndroidJUnit4.class)
public abstract class BaseTest {
    public static final long SHORT_WAIT = 1000;
    public static final long MEDIUM_WAIT = 2500;
    public static final long LONG_WAIT = 5000;

    public static void shortWait() {
        waitTime(SHORT_WAIT);
    }

    public static void mediumWait() {
        waitTime(MEDIUM_WAIT);
    }

    public static void longWait() {
        waitTime(LONG_WAIT);
    }

    private static void waitTime(long time) {
        try {Thread.sleep(time);
        } catch (InterruptedException e) { e.printStackTrace();}
    }

    @Rule public ActivityTestRule<LaunchActivity> mActivityRule = new ActivityTestRule<>(LaunchActivity.class);

    @Before public void init() {}

    protected Activity getCurrentActivity() {
// Path: presentation/src/main/java/presentation/foundation/BaseApp.java
// public class BaseApp extends Application {
//     private ApplicationComponent applicationComponent;
// 
//     @Override public void onCreate() {
//         super.onCreate();
//         initInject();
//         AppCare.YesSir.takeCareOn(this);
//     }
// 
//     private void initInject() {
//         applicationComponent = DaggerApplicationComponent.builder()
//                 .applicationModule(new ApplicationModule(this))
//                 .build();
//     }
// 
//     public ApplicationComponent getApplicationComponent() {
//         return applicationComponent;
//     }
// 
//     @Nullable public BaseFragmentActivity getLiveActivity(){
//         return (BaseFragmentActivity) AppCare.YesSir.getLiveActivityOrNull();
//     }
// }
// 
// Path: presentation/src/main/java/presentation/sections/launch/LaunchActivity.java
// public class LaunchActivity extends BaseFragmentActivity implements LaunchView {
//     @Inject protected LaunchPresenter launchPresenter;
// 
//     @Override protected void injectDagger() {
//         getApplicationComponent().inject(this);
//     }
// 
//     @Override protected void initViews() {
//         super.initViews();
//         launchPresenter.attachView(this);
//     }
// }


// Path: presentation/src/androidTest/java/presentation/common/BaseTest.java
import android.app.Activity;
import android.support.test.InstrumentationRegistry;
import android.support.test.rule.ActivityTestRule;
import android.support.test.runner.AndroidJUnit4;
import com.squareup.spoon.Spoon;
import org.junit.Before;
import org.junit.Rule;
import org.junit.runner.RunWith;
import presentation.foundation.BaseApp;
import presentation.sections.launch.LaunchActivity;

/*
 * Copyright 2015 RefineriaWeb
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package presentation.common;





@RunWith(AndroidJUnit4.class)
public abstract class BaseTest {
    public static final long SHORT_WAIT = 1000;
    public static final long MEDIUM_WAIT = 2500;
    public static final long LONG_WAIT = 5000;

    public static void shortWait() {
        waitTime(SHORT_WAIT);
    }

    public static void mediumWait() {
        waitTime(MEDIUM_WAIT);
    }

    public static void longWait() {
        waitTime(LONG_WAIT);
    }

    private static void waitTime(long time) {
        try {Thread.sleep(time);
        } catch (InterruptedException e) { e.printStackTrace();}
    }

    @Rule public ActivityTestRule<LaunchActivity> mActivityRule = new ActivityTestRule<>(LaunchActivity.class);

    @Before public void init() {}

    protected Activity getCurrentActivity() {
        BaseApp app = (BaseApp) InstrumentationRegistry.getTargetContext().getApplicationContext();