• 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
Unit testing & loading models
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Unit testing & loading models
      • From: Chuck Hill <email@hidden>
  • Prev by Date: Re: Spell Check with WebObjects
  • Next by Date: MEETING: Chicago CocoaHeads/CAWUG Tuesday November 11th
  • Previous by thread: Re: Spell Check with WebObjects
  • Next by thread: Re: Unit testing & loading models
  • Index(es):
    • Date
    • Thread