unit testing - Grails 1.3.3: controller.redirectArgs.action not populated -


Do anyone know what happened about the controller. Thank you. In the latest version of Grails (1.3.3)? It was used to work properly but now when I use it, I get NPE.

FooController {def someRedirect = {redirect (verb: "bar")}} class FooControllerTests grails.test extension. ControllerUnitTestes {Void testSomeRedirect () {specify the value of "controller.someRedirect ()") "bar", controller.redirectArgs.action}}

In this case the controller. RdirectArgs is already zero ...

Comparing the action in the string, I get the same problem was. The following has worked for me, where

the controller looks like this:

  class SomeObjectController {DEF Index = {Redirect (Action: List, Parameters: Parameters)} DEF List = {Params.max = Math.min (params.max? Params.max.toInteger (): 10, 100) [someObjectInstanceList: someObject.list (parameter), somObjectInstance total: someObject.count ()]}}  

and the test class will look something like this:

  class SomeObjectControllerTest Controller Unitesthesis {void testIndexRedirectToListAction () {controller.index ()) specifies the Excel controller.list , No Ntrk. Action}}  

Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -