// Path: app/src/test/java/com/earthblood/tictactoe/guice/TestToeRoboModule.java
// public class TestToeRoboModule extends AbstractModule{
// 
//     private final Application application;
// 
//     public TestToeRoboModule(Application application) {
//         this.application = application;
//     }
// 
//     @Override
//     protected void configure() {
// 
//         bind(HapticFeedbackHelper.class).toInstance(Mockito.mock(HapticFeedbackHelper.class));
//         bind(ToeGame.class).toInstance(Mockito.mock(ToeGame.class));
//         bind(PreferenceHelper.class).toInstance(Mockito.mock(PreferenceHelper.class));
//         bind(CoinTossHelper.class).toInstance(Mockito.mock(CoinTossHelper.class));
//         bind(HtmlHelper.class).toInstance(Mockito.mock(HtmlHelper.class));
//     }
// }


import com.earthblood.tictactoe.guice.TestToeRoboModule;
import org.robolectric.RuntimeEnvironment;
import org.robolectric.TestLifecycleApplication;
import java.lang.reflect.Method;
import roboguice.RoboGuice;
/**
 * @author John Piser developer@earthblood.com
 *
 * Copyright (C) 2014 EARTHBLOOD, LLC
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */
package com.earthblood.tictactoe.application;





@SuppressWarnings("UnusedDeclaration")
public class TestToe extends Toe implements TestLifecycleApplication {

    static {
        //TODO:Disabling roboblender for tests until time to figure out why it wasn't working
        RoboGuice.setUseAnnotationDatabases(false);
    }

    @Override
    public void onCreate() {
        super.onCreate();

        //RoboGuice.setBaseApplicationInjector(this, RoboGuice.DEFAULT_STAGE, RoboGuice.newDefaultRoboModule(this), new ToeRoboModule());
    }

    @Override
    public void beforeTest(Method method) {
    }

    @Override
    public void prepareTest(Object test) {
        TestToe application = (TestToe) RuntimeEnvironment.application;

// Path: app/src/test/java/com/earthblood/tictactoe/guice/TestToeRoboModule.java
// public class TestToeRoboModule extends AbstractModule{
// 
//     private final Application application;
// 
//     public TestToeRoboModule(Application application) {
//         this.application = application;
//     }
// 
//     @Override
//     protected void configure() {
// 
//         bind(HapticFeedbackHelper.class).toInstance(Mockito.mock(HapticFeedbackHelper.class));
//         bind(ToeGame.class).toInstance(Mockito.mock(ToeGame.class));
//         bind(PreferenceHelper.class).toInstance(Mockito.mock(PreferenceHelper.class));
//         bind(CoinTossHelper.class).toInstance(Mockito.mock(CoinTossHelper.class));
//         bind(HtmlHelper.class).toInstance(Mockito.mock(HtmlHelper.class));
//     }
// }


// Path: app/src/test/java/com/earthblood/tictactoe/application/TestToe.java
import com.earthblood.tictactoe.guice.TestToeRoboModule;
import org.robolectric.RuntimeEnvironment;
import org.robolectric.TestLifecycleApplication;
import java.lang.reflect.Method;
import roboguice.RoboGuice;

/**
 * @author John Piser developer@earthblood.com
 *
 * Copyright (C) 2014 EARTHBLOOD, LLC
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */
package com.earthblood.tictactoe.application;





@SuppressWarnings("UnusedDeclaration")
public class TestToe extends Toe implements TestLifecycleApplication {

    static {
        //TODO:Disabling roboblender for tests until time to figure out why it wasn't working
        RoboGuice.setUseAnnotationDatabases(false);
    }

    @Override
    public void onCreate() {
        super.onCreate();

        //RoboGuice.setBaseApplicationInjector(this, RoboGuice.DEFAULT_STAGE, RoboGuice.newDefaultRoboModule(this), new ToeRoboModule());
    }

    @Override
    public void beforeTest(Method method) {
    }

    @Override
    public void prepareTest(Object test) {
        TestToe application = (TestToe) RuntimeEnvironment.application;

        RoboGuice.overrideApplicationInjector(this, new TestToeRoboModule(this));