This repository was archived by the owner on Dec 6, 2017. It is now read-only.
This repository was archived by the owner on Dec 6, 2017. It is now read-only.
Should be able through injector instantiate a class that depends on the class being instantiated #5
Closed
Description
class ParentDynamicallyInstantiatingChild {
ParentDynamicallyInstantiatingChild(Injector injector) {
injector.get(ChildDependingOnParent);
}
}
class ChildDependingOnParent {
ChildDependingOnParent(ParentDynamicallyInstantiatingChild _);
}
it('should be able through injector instantiate a class that depends on the class being instantiated', () {
var injector = new Injector();
expect(() {
injector.get(ParentDynamicallyInstantiatingChild);
}, not(throwsA(anything)));
});
throws
Cannot resolve a circular dependency! (resolving ParentDynamicallyInstantiatingChild -> ChildDependingOnParent -> ParentDynamicallyInstantiatingChild)
Metadata
Metadata
Assignees
Labels
No labels