Vote count: 0
I have this spring boot application in which I have the below line inside a method.
BufferedReader reader = new BufferedReader(new FileReader("somePath"));
How can I inject this into my code so I can mock it for my unit tests? Using guice I could use a provider. But how can I achieve this using spring boot? Any help would be much appreciated.
asked 57 secs ago
How do I inject a buffered reader into a class with a file reader as its parameter using Spring boot?
Aucun commentaire:
Enregistrer un commentaire