• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Junittests, JavaMail and language-specific Components
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Junittests, JavaMail and language-specific Components
      • From: Christian Pekeler <email@hidden>
    • Re: Junittests, JavaMail and language-specific Components
      • From: Sacha Mallais <email@hidden>
  • Prev by Date: Code Coverage
  • Next by Date: Re: EOModeler & Subversion fixed?
  • Previous by thread: Re: Code Coverage
  • Next by thread: Re: Junittests, JavaMail and language-specific Components
  • Index(es):
    • Date
    • Thread