[2.4.0-java] Router not found on Unit Testing Controllers

168 views
Skip to first unread message

Ruither Borba

unread,
Jun 1, 2015, 7:36:31 PM6/1/15
to play-fr...@googlegroups.com
Hello again guys. I'm having some trouble trying to unit test my controllers following the documentation steps.

I've created a new app using the java template. Replaced the generated ApplicationTest with the ApplicationTest of the docs, corrected the compile errors related to wrong packages but there still something wrong with the additionalConfigurations that are passed to the FakeApplication (ImmutableMap.of("play.http.router", "javaguide.tests.Routes"))
I've tried a lot of different names and directories at javaguide.tests.Routes, but i get always the error below.

1) Error in custom provider, Configuration error: Configuration error[Router not found: javaguide.tests.Routes]
[error]   while locating play.api.test.FakeRouterProvider
[error]   while locating play.api.routing.Router
[...]

Did anyone knows what i'm missing or can share a reference to a github project that have this kind of tests working?

Ruither Borba

unread,
Jul 23, 2015, 8:15:47 PM7/23/15
to play-framework, del...@gmail.com
In case someone else get stuck on the same problem, this guy posted the solution: http://stackoverflow.com/questions/31509026/play-2-4-how-do-i-disable-routes-file-loading-during-unit-tests]
Reply all
Reply to author
Forward
0 new messages