I’m trying to figure out how to test my code in a proper way and stuck somewhere in the middle.
What I use:
Spring-boot based Java web-application. Java based configuration. Test.
What I want:
I want to manage my testing in a proper way. I have a @RestController
annotated class what has two objects what I’d like to change in tests. It’s an entities provider class BooksService
and database configuration class DBConfig
. I want to change implementations for these classes in my tests in a simple and proper way. I don’t know how to do it correctly.
What kind of help I need:
- Working project that implements this approach is most preferable. Don’t spend too many words, the working code is the best way to understand it for me.
- If there is no a complete project there, so code snippets with descriptions will be useful too.
- Links to some good and simple tutorials about 1) Java based configurations 2) Replacing Java based configuration for tests.
Sorry if my thoughts a little bit messy, I’m pretty new in Java EE development and still didn’t figure out with all basic topics well.
Aucun commentaire:
Enregistrer un commentaire