• 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
Re: Unit testing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unit testing


  • Subject: Re: Unit testing
  • From: Christian Pekeler <email@hidden>
  • Date: Mon, 7 Nov 2005 19:29:56 -0700

Slightly different topic, but how do you write tests at the component level?

Short: Don't. Instead, write code that can be tested independently. Long: http://pragmaticprogrammer.com/starter_kit/utj (for example)


My WOComponent classes need a WOContext in the constructor. And there needs to be a running applicaiton, or else you run into NullPointerExceptions.

If you insist and are using WOUnitTest: the test superclass WOUTTestCase implements pageWithName(String) which can be used for this purpose.



Christian

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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

References: 
 >Unit testing (From: Miguel Arroz <email@hidden>)
 >Re: Unit testing (From: Christian Pekeler <email@hidden>)
 >Re: Unit testing (From: Sam Barnum <email@hidden>)

  • Prev by Date: Re: Custom class with D2W
  • Next by Date: Unwanted Session Creation
  • Previous by thread: Re: Unit testing
  • Next by thread: Re: Unit testing
  • Index(es):
    • Date
    • Thread