use of proton.inject.DefaultModule in project AndroidTraining by mixi-inc.
the class FieldListenerTest method setUp.
@Override
protected void setUp() throws Exception {
super.setUp();
mMockApplication = new MockApplication();
Proton.initialize(mMockApplication, new DefaultModule() {
@Override
protected void configure() {
super.configure();
bindFieldListener(TestAnnotation.class, FieldListenerTest.this);
}
});
mInjector = Proton.getInjector(new MockContext(mMockApplication));
}
use of proton.inject.DefaultModule in project AndroidTraining by mixi-inc.
the class ProviderListenerTest method setUp.
@Override
protected void setUp() throws Exception {
super.setUp();
mMockApplication = new MockApplication();
Proton.initialize(mMockApplication, new DefaultModule() {
@Override
protected void configure() {
super.configure();
bindProviderListener(ProviderListenerTest.this);
bind(Aaa.class);
}
});
mInjector = Proton.getInjector(new MockContext(mMockApplication));
}
use of proton.inject.DefaultModule in project AndroidTraining by mixi-inc.
the class ObserverTest method setUp.
@Override
protected void setUp() throws Exception {
super.setUp();
mMockApplication = new MockApplication();
Proton.initialize(mMockApplication, new DefaultModule() {
@Override
protected void configure() {
super.configure();
bind(Observer.class);
}
});
mInjector = Proton.getInjector(new MockContext(mMockApplication));
}
use of proton.inject.DefaultModule in project AndroidTraining by mixi-inc.
the class StateRecoveryTest method setUp.
@Override
protected void setUp() throws Exception {
super.setUp();
mMockApplication = new MockApplication();
Proton.initialize(mMockApplication, new DefaultModule() {
@Override
protected void configure() {
super.configure();
bind(Aaa.class);
}
});
mInjector = Proton.getInjector(new MockContext(mMockApplication));
mObserverManager = mInjector.getInstance(ObserverManager.class);
mStateEventObserver = mInjector.getInstance(StateEventObserver.class);
}
use of proton.inject.DefaultModule in project AndroidTraining by mixi-inc.
the class ExampleApplication method onCreate.
@Override
public void onCreate() {
super.onCreate();
Proton.initialize(this, new DefaultModule() {
@Override
protected void configure() {
super.configure();
bind(Greeting.class).to(GreetingImpl.class);
}
});
}
Aggregations