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

What about functional tests? #6

Closed
MetalRex101 opened this issue Jan 20, 2020 · 4 comments
Closed

What about functional tests? #6

MetalRex101 opened this issue Jan 20, 2020 · 4 comments

Comments

@MetalRex101
Copy link

In https://github.com/sarulabs/di there is a great method Fill, which can be used to put object, for example mock by key. It is very useful, when it comes to functional testing. Do this package has any functions to make the same thing?

It looks like that If the Definition returns an interface type, each type, that implements that interface could safely replace existing in the container object.

@sarulabs
Copy link
Owner

Hello,
I created a new release. The generated containers now have a Fill method. It works the same way as in sarulabs/di.
Is this what you wanted ?

@MetalRex101
Copy link
Author

Hello! I will try it tomorrow, but it looks like it is! Great news! Thank you!

One more question: why constanst could not be placed in files with definitions? It looks like their place in the same package as definitions.

@sarulabs
Copy link
Owner

With the v4 you can now have constants in the definition files. You are even free to organize the code however you want.

@MetalRex101
Copy link
Author

Already tried that and it works! Thank you!

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

2 participants