Search in sources :

Example 1 with ActivityLayoutInflater

use of net.rdrei.android.scdl2.guice.ActivityLayoutInflater in project scdl by passy.

the class DownloadActivityTest method setUp.

@Before
public void setUp() {
    final AbstractModule module = new AbstractModule() {

        @Override
        protected void configure() {
            final Injector injector = TestHelper.getInjector();
            final AdViewManagerStub adViewManagerStub = new AdViewManagerStub(injector.getProvider(ApplicationPreferences.class), new ActivityLayoutInflater(Robolectric.buildActivity(Activity.class).create().get()));
            this.bind(AdViewManager.class).toInstance(adViewManagerStub);
        }
    };
    TestHelper.overridenInjector(this, module);
}
Also used : Injector(com.google.inject.Injector) ActivityLayoutInflater(net.rdrei.android.scdl2.guice.ActivityLayoutInflater) AbstractModule(com.google.inject.AbstractModule) ApplicationPreferences(net.rdrei.android.scdl2.ApplicationPreferences) AdViewManager(net.rdrei.android.scdl2.ui.AdViewManager) Before(org.junit.Before)

Aggregations

AbstractModule (com.google.inject.AbstractModule)1 Injector (com.google.inject.Injector)1 ApplicationPreferences (net.rdrei.android.scdl2.ApplicationPreferences)1 ActivityLayoutInflater (net.rdrei.android.scdl2.guice.ActivityLayoutInflater)1 AdViewManager (net.rdrei.android.scdl2.ui.AdViewManager)1 Before (org.junit.Before)1