Re: How to create EOClassDescription in test code?
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.