Re: Testing applications

From: Justin Deutsch (justin.deutsc..elevance.com.au)
Date: Wed Nov 24 2004 - 00:25:20 EST

  • Next message: Twan Kogels: "Re: selectRelationshipObjects and addPrefetch results in classcastexception"

    Now that I'm mocking the QueryEngine and ObjectStore I get a class cast
    exception. Any ideas?

    testGetUserExceptions(au.com.relevance.corporatedb.UsersTest)java.lang.ClassCastException
            at
    org.objectstyle.cayenne.access.DataContext.getParentDataDomain(DataContext.java:380)
            at org.objectstyle.cayenne.access.DataContext.<init>(DataContext.java:339)
            at
    au.com.relevance.corporatedb.UsersTest.testGetUserExceptions(UsersTest.java:128)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at org.jmock.core.VerifyingTestCase.runBare(Unknown Source)
            at au.com.relevance.corporatedb.UsersTest.main(UsersTest.java:29)

    On 24/11/2004 3:56 PM, Andrus Adamchik wrote:
    > Hi Justin,
    >
    > DataContext has another constructor that takes an instance of a parent
    > QueryEngine interface... Just like with all mock objects, you have to
    > mock the whole tree...
    >
    > Andrus
    >
    >
    > On Nov 23, 2004, at 7:05 PM, Justin Deutsch wrote:
    >
    >
    <snip>

    -- 
    Justin Deutsch
    

    Relevance... because results count

    Relevance Phone: +61 (0)2 6241 6400 A.B.N. 86 063 403 690 Fax: +61 (0)2 6241 6422 Unit 11, Mobile: +61 (0)40 246 55 88 Cnr Brookes & Heffernan Sts, E-mail: Justin.Deutsc..elevance.com.au Mitchell ACT 2911 Web: http://www.relevance.com.au



    This archive was generated by hypermail 2.0.0 : Wed Nov 24 2004 - 00:25:28 EST