• 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: How to create EOClassDescription in test code?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to create EOClassDescription in test code?


  • Subject: Re: How to create EOClassDescription in test code?
  • From: Christian Pekeler <email@hidden>
  • Date: Tue, 28 Oct 2003 21:37:53 -0700

I am trying to create a dumb mock subclass (for unit tests) below an entity class that extends EOGenericRecord.

What do you intend to do with that mock? I have thought of creating an EditingContext mock which might be handy for testing EnterpriseObjects without going to the DB, but can't imagine what a mock version of your EnterpriseObject could be useful for.



A post I found pointed out that the model must (of course) be available for a class description to be created. Can the model file(s) be made available to isolated code (outside an application context)?

Make sure the path to your WO application is the directory in which the jvm for your tests is invoked. This is necessary for resources to be found. If you're using the junit ant task, set the "dir" parameter to that path. In your test code, calling EOModelGroup.defaultGroup(); should be all that's necessary for the EOModels to get loaded.



Christian _______________________________________________ webobjects-dev mailing list | email@hidden Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev Do not post admin requests to the list. They will be ignored.

References: 
 >How to create EOClassDescription in test code? (From: "Erlandsson Martin" <email@hidden>)
 >Re: How to create EOClassDescription in test code? (From: petite_abeille <email@hidden>)

  • Prev by Date: Re: WO5.2.1 -> WO5.2.2 trouble
  • Next by Date: Re: Filtering array returned by an EO's relationship (D2J)
  • Previous by thread: Re: How to create EOClassDescription in test code?
  • Next by thread: Re: How to create EOClassDescription in test code?
  • Index(es):
    • Date
    • Thread