I am creating an external library (that will be later used in Unity) using Zenject. I would like to check if I can successfully resolve bind objects using an automated test. Eg. I have the following:
container.Bind<TBind>().To<TTo>().AsSingle();
To test this simple graph I can just call
container.Resolve<TBind>()
and see if there is any exception thrown.
However this is getting much more complicated once using constructs like WhenInjectedInto.
Is there any out-of-the-box solution for this? Or has someone wrote their own working solution and would like to share?
I realize, that there is a Validator when using Zenject withing Unity. But I want to validate the graph without Unity.
I am creating an external library (that will be later used in Unity) using Zenject. I would like to check if I can successfully resolve bind objects using an automated test. Eg. I have the following:
container.Bind<TBind>().To<TTo>().AsSingle();
To test this simple graph I can just call
container.Resolve<TBind>()
and see if there is any exception thrown.
However this is getting much more complicated once using constructs like
WhenInjectedInto
. Is there any out-of-the-box solution for this? Or has someone wrote their own working solution and would like to share?I realize, that there is a Validator when using Zenject withing Unity. But I want to validate the graph without Unity.