I just started playing with Play! Framework and came across such a problem: modules that were added as dependencies cannot be compiled when the application starts in test mode. The error pattern is repeated 2/2 times to date. A related class that belongs to an unsuccessful test suite cannot be resolved to a type.
My dependencies.yml file looks like this:
require: - play 1.2 - secure - crud - play -> cobertura 2.1 - play -> paginate head - play -> messages 1.0 - play -> i18ntools 1.0.1 # - play -> scaffold head
As you can see, I have already disabled the scaffold module, but the next one on the paginate line. The error that appears immediately after the first request is as follows:
Compilation error The file {module:paginate-head}/test/play/modules/paginate/MappedPaginatorTest.java could not be compiled. Error raised is : MockModel cannot be resolved to a type In {module:paginate-head}/test/play/modules/paginate/MappedPaginatorTest.java (around line 16) 12: 13: public class MappedPaginatorTest { 14: @Test 15: public void testPaginateByKey() { 16: Map<String, MockModel> models = new HashMap<String, MockModel>(); 17: List<String> keys = new ArrayList<String>(); 18:
The MockModel class MockModel placed in the same directory as the MappedPaginatorTest . (The same situation was with the scaffold module.) I use Eclipse to run the application in both modes, but when I start with play test from the command line, the same error appears.
I do not insist on installing modules for testing them. But if this is the only way, I can live with it.
source share