Re: Testing wicket 1.3

2007-09-20 Thread Nino Saturnino Martinez Vazquez Wael

ahh, yeah this are more flexible:)

regards Nino

Frank Bille wrote:

One thing you also could consider is using the TagTester. Currently you can
find a tag by using the getTagById and getTagByWicketId. My orignial plan
was to have several helper methods for finding the html tags you want for
testing.

http://wicketstuff.org/wicket13doc/org/apache/wicket/util/tester/TagTester.html

Frank


On 9/19/07, Nino Saturnino Martinez Vazquez Wael [EMAIL PROTECTED]
wrote:
  

Hi Kent

hmm, while this could be okay. I just fear the possibility that tests
may succeed if other components contains foo. This test does not take
hierarchy into account..

For the simple Bbcodecomponent, it will work as I will be testing it
isolated. However if others that are using the component wants to test
that the out come are correct, this could be a potential pitfall.


regards Nino

Kent Tong wrote:


Nino.Martinez wrote:

  

I was wondering how I should be testing with wicket. I've created the
bbcodecomponent, I have a bbcodeLabel. And I would like to write a test
for that. I can see that I can't use the assertLabel as that just gets
modelObjectToString, in the bbcodeLabel some formatting are done during
onComponentTagBody. Is this completely wrong, how should testing be
done? I can see that the dateLabel uses an approach with converters,
although im not sure how this are done. But are this more propper?




try something like:

  WicketTester tester = new WicketTester();
  tester.startPage(Home.class);
  tester.assertContains(foo);


  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





  


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Testing wicket 1.3

2007-09-19 Thread Nino Saturnino Martinez Vazquez Wael

Hi Kent

hmm, while this could be okay. I just fear the possibility that tests 
may succeed if other components contains foo. This test does not take 
hierarchy into account.. 

For the simple Bbcodecomponent, it will work as I will be testing it 
isolated. However if others that are using the component wants to test 
that the out come are correct, this could be a potential pitfall.



regards Nino

Kent Tong wrote:


Nino.Martinez wrote:
  
I was wondering how I should be testing with wicket. I've created the 
bbcodecomponent, I have a bbcodeLabel. And I would like to write a test 
for that. I can see that I can't use the assertLabel as that just gets 
modelObjectToString, in the bbcodeLabel some formatting are done during 
onComponentTagBody. Is this completely wrong, how should testing be 
done? I can see that the dateLabel uses an approach with converters, 
although im not sure how this are done. But are this more propper?





try something like:

WicketTester tester = new WicketTester();
tester.startPage(Home.class);
tester.assertContains(foo);

  


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Testing wicket 1.3

2007-09-18 Thread Kent Tong



Nino.Martinez wrote:
 
 I was wondering how I should be testing with wicket. I've created the 
 bbcodecomponent, I have a bbcodeLabel. And I would like to write a test 
 for that. I can see that I can't use the assertLabel as that just gets 
 modelObjectToString, in the bbcodeLabel some formatting are done during 
 onComponentTagBody. Is this completely wrong, how should testing be 
 done? I can see that the dateLabel uses an approach with converters, 
 although im not sure how this are done. But are this more propper?
 

try something like:

WicketTester tester = new WicketTester();
tester.startPage(Home.class);
tester.assertContains(foo);

-- 
View this message in context: 
http://www.nabble.com/Re%3A-Testing-wicket-1.3-tf4469190.html#a12758401
Sent from the Wicket - User mailing list archive at Nabble.com.


Re: Testing wicket 1.3

2007-09-17 Thread Nino Saturnino Martinez Vazquez Wael

Hi

I was wondering how I should be testing with wicket. I've created the 
bbcodecomponent, I have a bbcodeLabel. And I would like to write a test 
for that. I can see that I can't use the assertLabel as that just gets 
modelObjectToString, in the bbcodeLabel some formatting are done during 
onComponentTagBody. Is this completely wrong, how should testing be 
done? I can see that the dateLabel uses an approach with converters, 
although im not sure how this are done. But are this more propper?



regards Nino




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]