Hi

When I have to test a page with context parameter, I create another page say
Index which has a page link to this page along with the context

<t:pageLink t:page='PageToTest' t:context='name'>Page to Test</t:pageLink>

and then load Index page and click on the pagelink

Hope it helps

regards
Taha


On Sun, Jan 23, 2011 at 1:44 PM, Jun Tsai <jun.t...@gmail.com> wrote:

> hi,
>
> page(scala):
>
> class Start{
>    @ActivationRequestParameter("name")
>    private var name:String = _
>    def onActivate():Object={
>        return new TextStreamResponse("text/plain",name)
>    }
> }
>
>
> test (scala):
>
>       val appPackage = "mq.api";
>        val appName = "App"; // App1Module.java has configured some
> services.
>        val pageTester= new PageTester(appPackage, appName,
> "src/main/webapp")
>        val request = pageTester.getService(classOf[TestableRequest])
>        request.loadParameter("name","test")
>        val response= pageTester.renderPageAndReturnResponse("Start")
>        Assert.assertEquals(response.getOutput,"test")
>
> It doesn't work,because the name in age is null.
> How to test the page? thanks.
>
>
> --
> regards,
> Jun Tsai
>

Reply via email to