[2.4.0-java] package org.mockito does not exist

2,561 views
Skip to first unread message

Ruither Borba

unread,
May 31, 2015, 7:57:53 AM5/31/15
to play-fr...@googlegroups.com
After upgrading from a 2.3.8 app to 2.4.0 my old tests stop working. Apparently some test dependencies are no longer in the project.

on activator test ->

[error] ~dev/play/geld/test/PrincipalViewTest.java:21: package org.fest.assertions does not exist
[error] org.fest.assertions.Assertions
[error] ~dev/play/geld/test/services/MovimentoServiceTest.java:23: package org.mockito does not exist
[error] org.mockito.InjectMocks
[...]
[error] ~dev/play/geld/test/services/MovimentoServiceTest.java:50: cannot find symbol
[error]   symbol:   class InjectMocks
[error]   location: class services.MovimentoServiceTest
[error] InjectMocks
[error] ~dev/play/geld/test/PrincipalViewTest.java:36: cannot find symbol
[error]   symbol:   method assertThat(java.lang.String)
[error]   location: class PrincipalViewTest

Does somebody knows whats might be wrong here?

Ruither Borba

unread,
May 31, 2015, 4:21:47 PM5/31/15
to play-fr...@googlegroups.com
It worked after remove the org.fest.assertions from the tests (I've created a new project and I realized that this import is no longer present on ApplicationTest.java) and I had to add manually the mockito dependencies on build.sbt.

Mirco Dotta

unread,
May 31, 2015, 5:14:19 PM5/31/15
to play-fr...@googlegroups.com
Hi,

That’s right, you need an explicit dependencies to mockito in Play 2.4. By the way, this was also discussed in https://groups.google.com/forum/#!searchin/play-framework/Mockito$20availability/play-framework/ldUrpcjF3MY/7bWehatfaaoJ

Cheers,
Mirco
----------------
Mirco Dotta - @mircodotta

Typesafe – Build reactive apps!

-- 
You received this message because you are subscribed to the Google Groups "play-framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to play-framewor...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/play-framework/b097daf3-794c-44d6-8904-57a0080822c7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

signature.asc

Ruither Borba

unread,
Jun 1, 2015, 5:15:50 PM6/1/15
to play-fr...@googlegroups.com
Thanks Mirco, but shouldn't be a reference for it in the documentation? In localhost:9000/@documentation/JavaTest it is said that "The Mockito library is included in your project build to assist you in using mocks." and apparently that's not true.


Em domingo, 31 de maio de 2015 08:57:53 UTC-3, Ruither Borba escreveu:

Mirco Dotta

unread,
Jun 2, 2015, 5:32:28 AM6/2/15
to play-fr...@googlegroups.com
Absolutely, that should be corrected. I’ve been swamped with other things, but it’s on my todo list. Hopefully I’ll get to it today! :-)

— Mirco

----------------
Mirco Dotta - @mircodotta

Typesafe – Build reactive apps!

-- 
You received this message because you are subscribed to the Google Groups "play-framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to play-framewor...@googlegroups.com.
signature.asc
Reply all
Reply to author
Forward
0 new messages