use of dagger.ObjectGraph in project Rutgers-Course-Tracker by tevjef.
the class CoursePresenterImplTest method setUp.
@Before
public void setUp() throws Exception {
ObjectGraph og = ObjectGraph.create(new TestModule(), new MockModule());
og.inject(this);
coursePresenterImpl = new CoursePresenterImpl(TestConts.getPrimarySemesterRequest());
og.inject(coursePresenterImpl);
}
use of dagger.ObjectGraph in project Rutgers-Course-Tracker by tevjef.
the class SubjectPresenterImplTest method setUp.
@Before
public void setUp() throws Exception {
ObjectGraph og = ObjectGraph.create(new TestModule(), new MockModule());
og.inject(this);
subjectPresenterImpl = new SubjectPresenterImpl(TestConts.getPrimarySemesterRequest());
og.inject(subjectPresenterImpl);
}
use of dagger.ObjectGraph in project Rutgers-Course-Tracker by tevjef.
the class TrackedSectionsPresenterImplTest method setUp.
@Before
public void setUp() throws Exception {
ObjectGraph og = ObjectGraph.create(new TestModule(), new MockModule());
og.inject(this);
trackedSectionsPresenterImpl = new TrackedSectionsPresenterImpl();
og.inject(trackedSectionsPresenterImpl);
}
use of dagger.ObjectGraph in project dagger by square.
the class CoffeeApp method main.
public static void main(String[] args) {
ObjectGraph objectGraph = ObjectGraph.create(new DripCoffeeModule());
CoffeeApp coffeeApp = objectGraph.get(CoffeeApp.class);
coffeeApp.run();
}
use of dagger.ObjectGraph in project mortar by square.
the class ObjectGraphServiceTest method createMortarScopeUsesModules.
@Test
public void createMortarScopeUsesModules() {
MortarScope scope = createRootScope(ObjectGraph.create(new AppleModule(), new BagelModule()));
ObjectGraph objectGraph = getObjectGraph(scope);
assertThat(objectGraph.get(HasApple.class).string).isEqualTo(Apple.class.getName());
assertThat(objectGraph.get(HasBagel.class).string).isEqualTo(Bagel.class.getName());
try {
objectGraph.get(HasCarrot.class);
fail("Expected IllegalArgumentException");
} catch (IllegalArgumentException e) {
// pass
}
}
Aggregations