Feature: automatic injection#43
Conversation
PycKamil
left a comment
There was a problem hiding this comment.
Code looks good, I have only spotted couple text issue that can be fixed in other PR 👍
| } | ||
| ``` | ||
|
|
||
| This way when your class or struct is created via injector, shortly afterwards it receives `injectDependencies(injector:)` call. This is the place where you want to fetch your dependencies from `injector`, or dependencies are injected automatically (in case of `AutoInjectable`. |
| injectCreatableObject = InjectCreatableClass(injector: injector) | ||
| } | ||
|
|
||
| it("should not have object conforming to protocol injected") { |
There was a problem hiding this comment.
looks like either tests description is wrong or test, since they don't match
| expect(injectCreatableObject.objectConformingToProtocol).to(beIdenticalTo(objectConformingToProtocol)) | ||
| } | ||
|
|
||
| it("should not have empty swift object injected") { |
There was a problem hiding this comment.
looks like either tests description is wrong or test, since they don't match
| injectCreatableObject = InjectCreatableClass(injector: injector) | ||
| } | ||
|
|
||
| it("should not have object conforming to protocol injected") { |
There was a problem hiding this comment.
looks like either tests description is wrong or test, since they don't match
| expect(injectCreatableObject.emptySwiftObject).to(beIdenticalTo(emptySwiftObject)) | ||
| } | ||
|
|
||
| it("should have creatable object injected") { |
There was a problem hiding this comment.
looks like either tests description is wrong or test, since they don't match
| injectCreatableObject = InjectCreatableClass(injector: injector) | ||
| } | ||
|
|
||
| it("should not have object conforming to protocol injected") { |
There was a problem hiding this comment.
looks like either tests description is wrong or test, since they don't match
| expect(injectCreatableObject.objectConformingToProtocol).notTo(beNil()) | ||
| } | ||
|
|
||
| it("should not have empty swift object injected") { |
There was a problem hiding this comment.
looks like either tests description is wrong or test, since they don't match
resolves #37
Injectableprotocol by addingCreatableandInjectCreatableprotocols withinit()andinit(injector: Injecting)respectively