• 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
WOUnitTest and sessions and EditingContexts
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

WOUnitTest and sessions and EditingContexts


  • Subject: WOUnitTest and sessions and EditingContexts
  • From: David Cake <email@hidden>
  • Date: Mon, 13 Dec 2004 17:06:42 +0800

I'm attempting to use WOUnitTest. I have been somewhat thrown in at the deep end, however, as pretty much the first tests I've been attempting to write are testing our project subclass of EOEditingContext (lets call it OurEditingContext), and I'm not quite sure what to do.
In our Application.java, we have overloaded NewEOEditingContext(Session session) so that it returns OurEditingContext, but this doesn't work with TestCases, so I need to do something like
protected void setUp() throws Exception {
super.setUp();
OurEditingContext editingContext = new OurEditingContext(session());
}
Only that is not working, because its not finding session() (which confuses me, because it should be able to find session() from WOComponent, shouldn't it?
We are overloading EOEditingContext so it also keeps session information, because we want to put creationdate and modificationdate logging into our subclass of EOGenericRecord, and EOGenericRecord has no direct access to the session (but does have access to the editing context).
Regards
David
_______________________________________________
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: WOUnitTest and sessions and EditingContexts
      • From: Colin Clark <email@hidden>
    • Re: WOUnitTest and sessions and EditingContexts
      • From: Christian Pekeler <email@hidden>
  • Prev by Date: Re: XmlHttpRequest and WO
  • Next by Date: date comparison in EOModeler
  • Previous by thread: Re: WOFileUpload bindings [SOLVED]
  • Next by thread: Re: WOUnitTest and sessions and EditingContexts
  • Index(es):
    • Date
    • Thread