• 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
JUnit for testing EOs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

JUnit for testing EOs


  • Subject: JUnit for testing EOs
  • From: Paul Hoadley <email@hidden>
  • Date: Mon, 26 Nov 2007 21:49:29 +1030

Hello,

I'm running WO 5.4 on Leopard, Eclipse 3.3.1.1, WOLips 3.3.4667, and writing some tests with JUnit 4 shipped with Eclipse. I can't quite get any tests running which try to instantiate EOs. I get the stack trace appended below, leading off with "Unabled to find an EOClassDescription for objects of class net.logicsquad.am.model.auth.Country". I'm trying to follow the subsection "JUnit and Eclipse" in chapter 1 of "Practical WebObjects", but obviously the book is a few versions behind in all the tools. From the Run dialog, I select the test class > Classpath tab > then I've tried adding to both "Bootstrap Entries" and "User Entries" the folder /AM/build/AM.woa/Contents/Resources/Java, but I get no joy with either. Am I adding the right folder to the right place?

(As an aside, do I need to go through this for every single test class I create?)


---
java.lang.IllegalStateException: Unabled to find an EOClassDescription for objects of class net.logicsquad.am.model.auth.Country
at com .webobjects .eocontrol.EOGenericRecord.__setClassDescription(EOGenericRecord.java: 98)
at com.webobjects.eocontrol.EOGenericRecord.<init>(EOGenericRecord.java:73)
at net.logicsquad.am.core.LSGenericRecord.<init>(LSGenericRecord.java: 30)
at net.logicsquad.am.model.auth._Country.<init>(_Country.java:16)
at net.logicsquad.am.model.auth.Country.<init>(Country.java:5)
at net .logicsquad.am.test.TestContactDetails.before(TestContactDetails.java: 44)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun .reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java: 39)
at sun .reflect .DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java: 25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org .junit .internal .runners.BeforeAndAfterRunner.invokeMethod(BeforeAndAfterRunner.java:74)
at org .junit .internal .runners.BeforeAndAfterRunner.runBefores(BeforeAndAfterRunner.java:50)
at org .junit .internal .runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:33)
at org .junit .internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java:75)
at org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java: 45)
at org .junit .internal .runners .TestClassMethodsRunner.invokeTestMethod(TestClassMethodsRunner.java:66)
at org .junit .internal .runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:35)
at org.junit.internal.runners.TestClassRunner $1.runUnprotected(TestClassRunner.java:42)
at org .junit .internal .runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
at org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
at org .eclipse .jdt .internal .junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
at org .eclipse .jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org .eclipse .jdt .internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java: 460)
at org .eclipse .jdt .internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java: 673)
at org .eclipse .jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java: 386)
at org .eclipse .jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java: 196)
---



-- Paul.

w  http://logicsquad.net/
h  http://paul.hoadley.name/


_______________________________________________ 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: JUnit for testing EOs
      • From: Chuck Hill <email@hidden>
  • Prev by Date: FrontBase: renaming NOT NULL columns
  • Next by Date: Re: WebObjects vs. Web Services ...
  • Previous by thread: Re: FrontBase: renaming NOT NULL columns
  • Next by thread: Re: JUnit for testing EOs
  • Index(es):
    • Date
    • Thread