2013-03-05 49 views
0

再次使用Play !,现在使用2.0.3-RC2,我遇到了测试问题。在子软件包中测试Play 2.0控制器

我有下控制器包打包某些控制器的应用程序,例如:

package controllers.AdminApp; 

class SomeController extends Controller { 
    public void index() { 
     /... 
} 

而且根据在http://www.playframework.com/documentation/2.1.0/JavaFunctionalTest文档,我希望此控制器的测试,以类似:

Result result = callAction(controllers.routes.ref.AdminApp.SomeController.index()); 

但不起作用,因为没有SomeController作为controllers.routes.ref.AdminApp的成员,只有ReverseAdminApp_SomeController,并且不能从那里调用index()方法。

您是否有任何经验在子包内测试Play 2.0 Java控制器?

回答

0

升级2.1.0,并意识到intelliJ没有帮我找出问题。

Result result = callAction(controllers.adminApp.routes.ref.Application.index());