Hi,

I'm trying to make the GAE local testing stuff (http://code.google.com/
appengine/docs/java/tools/localunittesting.html)  work with Clojure
and running into a cast problem.  Specifically, the example shows

 private final LocalServiceTestHelper helper =
        new LocalServiceTestHelper(new
LocalDatastoreServiceTestConfig());

where the LocalServiceTestHelper ctor takes one arg of type
LocalServiceTestConfig (which is an interface).
LocalDatastoreServiceTestConfig implements LocalServiceTestConfig.

which I try to do in clojure like this:

(def foo (new LocalDatastoreServiceTestConfig))
(def bar (LocalServiceTestHelper. foo))

which yields a java.lang.ClassCastException.  Messing around with
class, .getName, cast, etc. I end up with:

com.google.appengine.tools.development.testing.LocalDatastoreServiceTestConfig
cannot be cast to java.lang.Class

It seems that clojure won't treat LocalDatastoreServiceTestConfig as a
LocalServiceTestConfig.  Am I interpreting all this correctly?  I'm
relatively new to clojure and my java is a little rusty, but I've
banged my head on this all afternoon and I'm out of ideas.

Thanks,

Gregg

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to