You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Martin Dilger (Issue Comment Edited) (JIRA)" <ji...@apache.org> on 2011/10/06 22:57:29 UTC
[jira] [Issue Comment Edited] (WICKET-4112)
WicketTester#startComponentInPage and WicketTester#assertModelValue have
inconsistent behavior.
[ https://issues.apache.org/jira/browse/WICKET-4112?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13122059#comment-13122059 ]
Martin Dilger edited comment on WICKET-4112 at 10/6/11 8:55 PM:
----------------------------------------------------------------
I agree, this conflicts and was introduced in WICKET-1214, but I think, it could be safe to remove since
now we can use startComponentInPage which removes the indirection with ITestPanelSource, I will inspect on this.
Any recommendations?
was (Author: splitshade):
I think the same, this conflicts and was introduced in WICKET-1214.
so, what do we do?
> WicketTester#startComponentInPage and WicketTester#assertModelValue have inconsistent behavior.
> -----------------------------------------------------------------------------------------------
>
> Key: WICKET-4112
> URL: https://issues.apache.org/jira/browse/WICKET-4112
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.5.0, 1.5.1
> Reporter: Martin Dilger
> Attachments: wicket.zip
>
>
> I try the following (in Pseudocode):
> tester = new WicketTester();
> tester.startComponentInPage(new Label("test","hello");
> tester.assertModelValue("test","hello"); --> throws
> java.lang.IllegalArgumentException: Component is not a container and so does not contain the path test.
> Funny as it is, to make this work, you have to do the following assertion:
> tester.assertModelValue("", "hello");
> The error lies in
> public Component getComponentFromLastRenderedPage(String path,
> final boolean wantVisibleInHierarchy)
> in Line: path = startComponent.getId() + ":" + path;
> I will provide a patch this evening.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira