-
-
Notifications
You must be signed in to change notification settings - Fork 673
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
Simplify Dependency Injection Setup #150
Comments
I'd like to help. Can you tell more about what we're trying to solve here? |
Hey again @douglasramos 😄 The WebApplicationFactory would make the Component/Integration Tests easier to setup. It's a good idea to see it implemented here. My initial thoughts was to design the dependency injection of "Real Implementations" like Entity Framework fallback into "In Memory" if it is running on test mode. Also, features like Swagger, Authentication, API Versioning need some love segregating them. |
Hi, @ivanpaulovich Hmm, interesting. I can't think of a way to build this "switcher" inside of the WebAPI project, though. At least not an elegant way. How would the server itself have the knowledge that it is under test? The way I see, the approach would be the WebApplicationFactory act as the switcher, changing EF Core implementation to in-memory fake ones. Unfortunately, that doesn’t cover unit test cases. Let me know if you have any more thoughts on this :) |
Hi @douglasramos, Sorry for the delay in answering this topic. Did you see the new
|
Closing as topic is too old. |
I'd like to simplify Dependency Injection of Modules that fallback on each other, For instance, the Entity Framework is replaced by the In Memory Fakes.
It would be nice to make Persistence module smarter to switch from Real Mode to Test Mode.
The text was updated successfully, but these errors were encountered: