diff --git a/test/hex/di/InjectorTest.hx b/test/hex/di/InjectorTest.hx index 7a69c5e..4b6c7cd 100644 --- a/test/hex/di/InjectorTest.hx +++ b/test/hex/di/InjectorTest.hx @@ -115,8 +115,10 @@ class InjectorTest var injectee = new InterfaceInjecteeWithGeneric(); var s = new ClazzWithGeneric(); var i = new ClazzWithGeneric(); + var o = new ClazzWithGeneric<{}>(); this.injector.mapClassName( "hex.di.mock.types.InterfaceWithGeneric" ).toValue( s ); this.injector.mapClassName( "hex.di.mock.types.InterfaceWithGeneric" ).toValue( i ); + this.injector.mapClassName( "hex.di.mock.types.InterfaceWithGeneric<{}>" ).toValue( o ); this.injector.injectInto( injectee ); Assert.equals( s, injectee.stringProperty, "Value should have been injected" ); Assert.equals( i, injectee.intProperty, "Value should have been injected" ); diff --git a/test/hex/di/mock/injectees/InterfaceInjecteeWithGeneric.hx b/test/hex/di/mock/injectees/InterfaceInjecteeWithGeneric.hx index 91e5783..a3ca2cc 100644 --- a/test/hex/di/mock/injectees/InterfaceInjecteeWithGeneric.hx +++ b/test/hex/di/mock/injectees/InterfaceInjecteeWithGeneric.hx @@ -14,6 +14,9 @@ class InterfaceInjecteeWithGeneric implements IInjectorContainer @Inject public var intProperty : InterfaceWithGeneric; + @Inject + public var objectProperty : InterfaceWithGeneric<{}>; + public function new() {