• 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
Database testing and EOF; junit testrunner environment;
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Database testing and EOF; junit testrunner environment;


  • Subject: Database testing and EOF; junit testrunner environment;
  • From: Greg Brown <email@hidden>
  • Date: Fri, 7 Jul 2006 11:55:11 -0400

I am trying to set up DBUnit test AND test EO stuff also.

It seems the testrunner environment is very different than the normal environment that EOF operates under; I can't use EOF to do fetches. If I try, 

java.lang.IllegalArgumentException: An object store for the entity "Patient" could not be found. Verify that the entity is defined in an EOModel, and that the model is installed properly. To see what models are loaded, you can try printing the return value of EOModelGroup.defaultGroup() in your application.
at com.webobjects.eocontrol.EOObjectStoreCoordinator.objectsWithFetchSpecification(EOObjectStoreCoordinator.java:536)
at com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecification(EOEditingContext.java:4114)


Of course the fetches work with a normal Application launch, but not in the test environment; many missing resources.

I looked at WOUnitTest, 

but it has a WOOUTMAIN web component that calls 

 public WOComponent saveSettings() {
setSettings();
        try {
            WOUTTestRunner.savePreferences();
        } catch (java.io.IOException e) {
            NSLog.err.appendln("WOUT failed to save settings because " + e);
        }
        return context().page();
    }

now  public class WOUTTestRunner extends BaseTestRunner 

BUT there is no  WOUTTestRunner.savePreferences(); at least under junit 3.8.1

So what does work for testing database/EOF?

Thanks,

Greg
 _______________________________________________
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: Database testing and EOF; junit testrunner environment;
      • From: Christian Pekeler <email@hidden>
  • Prev by Date: Re: getting the socket?
  • Next by Date: Re: WWDC WO Meet
  • Previous by thread: Re: WORequest formValues return null for certain bot
  • Next by thread: Re: Database testing and EOF; junit testrunner environment;
  • Index(es):
    • Date
    • Thread