You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Cedric Gatay (JIRA)" <ji...@apache.org> on 2013/06/29 18:48:20 UTC

[jira] [Commented] (WICKET-5258) BaseWicketTester startComponentInPage(final C component, IMarkupFragment pageMarkup) does not set componentInPage.isInstantiated = true;

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

Cedric Gatay commented on WICKET-5258:
--------------------------------------

Hi,
which version of 1.5.x are you using ? In latest (branch build/1.5.10) I have the mentioned line (as well as on wicket-6x and master).
Please consider upgrading if you're using an outdated version of 1.5.x branch.

Regards,
                
> BaseWicketTester startComponentInPage(final C component, IMarkupFragment pageMarkup) does not set componentInPage.isInstantiated = true;
> ----------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-5258
>                 URL: https://issues.apache.org/jira/browse/WICKET-5258
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.5.10, 1.5.11
>         Environment: Ubuntu 12.04, Sun JDK 1.6.0_38 64bit
>            Reporter: Antti Hätinen
>            Priority: Minor
>              Labels: BaseWicketTester
>
> While migrating from Wicket 1.4 to 1.5 our unit tests fail for basic test checking if the component can be rendered. After some debugging, I noticed that the two versions of BaseWicketTester.startComponentInPage behave a bit differently:
> BaseWicketTester.java
> 	public final <C extends Component> C startComponentInPage(final Class<C> componentClass,
> 		final IMarkupFragment pageMarkup)
> row: 1403 		
> 			componentInPage = new ComponentInPage();
> 			componentInPage.component = comp;
> 			componentInPage.isInstantiated = true;
> but
> 	public final <C extends Component> C startComponentInPage(final C component,
> 		IMarkupFragment pageMarkup)
> row: 1514
> 			componentInPage = new ComponentInPage();
> 			componentInPage.component = component;
> does not set isInstantiated to true, which causes my unit tests to fail. If I add 
> 			componentInPage.isInstantiated = true;
> to the second version, I get my old unit tests to pass, so I would suggest that isInstantiated = true would be set for the both versions?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira