Unit testing & loading models
Unit testing & loading models
- Subject: Unit testing & loading models
- From: Logi Helguson <email@hidden>
- Date: Tue, 11 Nov 2008 14:26:09 +0000
- Thread-topic: Unit testing & loading models
I created a setUp for my Unit test to load the models I needed:
// add eomodels
NSArray<String> models = new NSArray<String>( new String[] { "MY_MODEL" } );
String path = getClass().getResource( "/" ).toString();
path = path.replace( "bin/", "" );
// now we should be at the workspace, add location for EOModles
path = path.concat( "/Resources/" );
for( String model : models ) {
if( EOModelGroup.defaultGroup().modelNamed( model ) == null )
{
EOModelGroup.defaultGroup().addModelWithPathURL( new URL( path +
model + ".eomodeld" ) );
}
}
We have a principal class that connects the emodels to the development or
the deployment DB.
I noticed that if my setUp only contains EOModelGroup.defaultGroup() all my
models are loaded and I'm pretty shure that this didn't happen before.
Can anyone enlighten me or even better tell me how you set up your tests or
how I should set them up ;)
P.s. Project Wonder( max 5 days old version ), Eclipse & WOLips 3.4.
With well-being and veneration,
Logi Helgu
_______________________________________________
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