[ 
https://issues.apache.org/jira/browse/WICKET-2954?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Juergen Donnerstag resolved WICKET-2954.
----------------------------------------

         Assignee: Juergen Donnerstag
    Fix Version/s: 1.4.10
                   1.5-M1
       Resolution: Fixed

applied

> Add the ability to assert against BookmarkablePageLink in the same way you 
> can with wicketTester.assertPageLink
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-2954
>                 URL: https://issues.apache.org/jira/browse/WICKET-2954
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>            Reporter: Adam Bender
>            Assignee: Juergen Donnerstag
>            Priority: Minor
>             Fix For: 1.4.10, 1.5-M1
>
>
> It would be very useful to add the ability to the wicketTester to assert the 
> contents of a bookmarkable page link without having to cause the tester to 
> click the link (currently the only built in way to do so). A method like the 
> following could be used to actually check the page that was pointed to as 
> well as any page parameters:
> public void assertBookmarkablePageLink(String id, Class< ? extends WebPage> 
> pageClass, String parameters)
>     {
>         BookmarkablePageLink< ? > pageLink = null;
>         try
>         {
>             pageLink = (BookmarkablePageLink< ? 
> >)tester.getComponentFromLastRenderedPage(id);
>         }
>         catch(ClassCastException e)
>         {
>             throw new IllegalArgumentException("Component with id:" + id + " 
> is not a BookmarkablePageLink");
>         }
>         assertEquals("BookmarkablePageLink: " + id + " is pointing to the 
> wrong page", pageClass, pageLink.getPageClass());
>         assertEquals("One or more of the parameters associated with the 
> BookmarkablePageLink: " + id + " do not match", new 
> PageParameters(parameters), pageLink.getPageParameters());
>     }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to