Re: WicketTester#startComponentInPage and tester#assertModelValue

2011-10-06 Thread splitshade
https://issues.apache.org/jira/browse/WICKET-4112

I will provide a patch this evening.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/WicketTester-startComponentInPage-and-tester-assertModelValue-tp3874269p3877347.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: WicketTester#startComponentInPage and tester#assertModelValue

2011-10-05 Thread Andrea Del Bene

Hi,

I agree with you, that's a little ambiguous. Why 
'getComponentFromLastRenderedPage' uses 'startComponent'? Shouldn't be 
'path' an absolute path to the component on the page?



Hi,

I have a rather strange behavior, and I don´t know what I´m doing wrong.
Before I open a Bug, I would like to hear some opinions, why this works this
way.

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;

Here i think you would need to check whether startComponent is a
WebMarkupContainer or not,
I would file a Bug and provide a patch, or am I completely wrong?

Regards

Martin


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/WicketTester-startComponentInPage-and-tester-assertModelValue-tp3874269p3874269.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org






-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: WicketTester#startComponentInPage and tester#assertModelValue

2011-10-05 Thread Martin Grigorov
Please create a ticket with a quickstart.
Thanks!

On Wed, Oct 5, 2011 at 6:14 PM, Andrea Del Bene adelb...@ciseonweb.it wrote:
 Hi,

 I agree with you, that's a little ambiguous. Why
 'getComponentFromLastRenderedPage' uses 'startComponent'? Shouldn't be
 'path' an absolute path to the component on the page?

 Hi,

 I have a rather strange behavior, and I don´t know what I´m doing wrong.
 Before I open a Bug, I would like to hear some opinions, why this works
 this
 way.

 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;

 Here i think you would need to check whether startComponent is a
 WebMarkupContainer or not,
 I would file a Bug and provide a patch, or am I completely wrong?

 Regards

 Martin


 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/WicketTester-startComponentInPage-and-tester-assertModelValue-tp3874269p3874269.html
 Sent from the Users forum mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org





 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org





-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org