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]