Junittests, JavaMail and language-specific Components
Junittests, JavaMail and language-specific Components
- Subject: Junittests, JavaMail and language-specific Components
- From: "Michael Holtermann" <email@hidden>
- Date: Mon, 13 Jun 2005 07:45:11 +0200
Hi!
I'm trying to develop an application using test driven development methods.
The application contains a number of language-dependent components (in
English.lproj and German.lproj), some packages (components, pages, model) and
JavaMail to send some notifications.
Until the splitting into languages my testcases run quite well, by creating an
Application, a Session, WOContext and simply instantiating the component.
But since the split-up I'll get a NullPointerException, if I try to create the
component.
By giving WOUnitTest a chance things turned more funny...
If I call (AddButton)WOUTTestCase#pageWithName("component.AddButton") I'll get
a ClassCastException: javax.mail.Session is not a subclass of WOSession. Ups.
It seems that WebObjects flatten *all* classes into one big package. What a
nice idea... :-/
While calling (AddButton)WOUTTestCase#pageWithName("AddButton") (without the
package) a ClassCastException on a WOComponent occurs, without the cast this
method returns a WOComponent with the name "AddButton", but this is useless
since I'm going to test my custom component, not WOComponent.
So, the simple question at the end:
How do you test components, that resides in a language-folder?
Thanks a lot!
Greetings, Michael.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden