use of net.rdrei.android.scdl2.ApplicationPreferences in project scdl by passy.
the class AdViewManagerTest method setUp.
@Before
public void setUp() {
mActivity = Robolectric.buildActivity(Activity.class).create().get();
final ApplicationPreferences preferences = new ApplicationPreferences() {
@Override
public boolean isAdFree() {
return mAdFree;
}
};
AbstractModule module = new AbstractModule() {
@Override
protected void configure() {
bind(ApplicationPreferences.class).toInstance(preferences);
bind(ActivityLayoutInflater.class).toInstance(new TestLayoutInflater(mActivity));
}
};
final ContextScope contextScope = new ContextScope(Robolectric.application);
contextScope.enter(mActivity);
try {
TestHelper.overridenInjector(this, module);
} finally {
contextScope.exit(mActivity);
}
}
Aggregations