If you are testing something non trivial you will most likely need the
entire environment setup ( requestcycle, session, etc )

That is what start component does I believe.

-igor




On 3/30/08, Ned Collyer <[EMAIL PROTECTED]> wrote:
>
> What I've done is.. but feels like it could be nicer. (but this is alright
> really :))
>
> public void testMyBehavior() {
> //create form component to have behaviour placed around it.
> FormComponent component = new TextField("testId", new
> Model("testFieldValue"));
> component.error("An error");
>
> XmlTag xmlTag = new XmlTag();
> xmlTag.setName("test");
>
> ComponentTag tag = new ComponentTag(xmlTag);
> MyBehavior behavior = new MyBehavior();
> behavior.onComponentTag(component, tag);
>
> assert(tag.someproperty stuff to test).
> }
>
> The thing that was confusing me thus far, was "wicketTester.startComponent".
>
> Seems like I'm better off not using it.
> --
> View this message in context:
> http://www.nabble.com/Best-method-of-testing-borders-tp16389412p16389744.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> 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]

Reply via email to