I am looking for complete example of unit test for play 2.4 application + DI. The idea is very simple:
- We have application.test.conf from which I want to read the configuration data, run evolutions etc.
-
Then I want to inject instance of class which uses DI, example:
class UserBean @Inject()(dbConfigProvider: DatabaseConfigProvider, implicit val configuration: Configuration, cacheApi: CacheApi) {
}
-
Then call methods of injected object and test it.
The problem that I faced described here: Inject my bean-like class to test play 2.4 but nobody answers my question. Appreciate any help
Aucun commentaire:
Enregistrer un commentaire