How to create EOClassDescription in test code?
How to create EOClassDescription in test code?
- Subject: How to create EOClassDescription in test code?
- From: "Erlandsson Martin" <email@hidden>
- Date: Wed, 29 Oct 2003 00:20:49 +0100
- Thread-topic: How to create EOClassDescription in test code?
Hi everyone.
I am trying to create a dumb mock subclass (for unit tests) below an entity class that extends EOGenericRecord. In order to be able to do that, I need to create an EOClassDescription instance corresponding to my entity class. How can I do this in a unit test context?
I have tried all methods that return EOClassDescription, but I they all produce a null result.
Example:
EOClassDescription eocd = EOClassDescription.classDescriptionForEntityName("EntityClass"); //eocd is null after this line
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)? I tried to explicitly set the NEXT_ROOT, LOCALROOT and WOAINSTALLROOT variables as JVM arguments in an attempt make the model file available to the EOClassDescription methods, but no luck...
Any comments about this problem or about other experiences of creating Mocks for WO entity classes are greatly appreciated!
Thanks,
/Martin
_______________________________________________
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.