[ 
https://issues.apache.org/jira/browse/WICKET-6422?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16084046#comment-16084046
 ] 

Kamil edited comment on WICKET-6422 at 7/12/17 2:19 PM:
--------------------------------------------------------

well... I still have 4 other bugs that I wanted to show you (that I reproduced 
in "my quickstart") so I wanted to learn how to do it "your way", but I can not 
find that much time lately (I have everything already configured with Gradle, 
and configuring it again with maven is taking a lot of time)


was (Author: eximius):
well... I still have 4 other bugs that I wanter to show you (that I reproduced 
in "my quickstart") so I wanted to learn how to do it "your way", but I can not 
find that much time lately (I have everything already configured with Gradle, 
and configuring it again with maven is taking a lot of time)

> WicketTester should allow for testing wicket:message / Component body
> ---------------------------------------------------------------------
>
>                 Key: WICKET-6422
>                 URL: https://issues.apache.org/jira/browse/WICKET-6422
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 8.0.0-M6
>            Reporter: Kamil
>
> When I create link like this:
> {code}
> @Override
> protected void onInitialize() {
>       super.onInitialize();
>       add(new AjaxLink<String>("myButton", Model.of("my.label")) {
>               @Override
>               public void onClick(final AjaxRequestTarget target) {
>               }
>       });
> }
> {code}
> I can test label value using:
> {code}
> wicketTester.assertModelValue("myButton", "my.label");
> {code}
> But when I create it like this:
> {code}
> //java:
> add(new AjaxLink<Void>("myButton") {
>       @Override
>       public void onClick(final AjaxRequestTarget target) {
>       }
> });
> //markup:
> <div wicket:id="myButton">
>       <wicket:message key="my.label"/>
> </div>
> {code}
> I have no possibility to test it, because:
> 1) assertModelValue is null
> 2) I can not get its child component because messageID is random:
> {code}
> [MessageContainer [Component id = wicket_message411296549]]
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to