You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Antti Hätinen (JIRA)" <ji...@apache.org> on 2013/06/28 14:14:19 UTC

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

Antti Hätinen created WICKET-5258:
-------------------------------------

             Summary: 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


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