Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to validate object graph as an automated test outside of Unity #659

Open
mkrzaczek opened this issue Sep 10, 2019 · 0 comments
Open

Comments

@mkrzaczek
Copy link

mkrzaczek commented Sep 10, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant