On Wed, Feb 25, 2009 at 12:18 AM, .Bill Smith <william.m.sm...@gmail.com> wrote: > The map alone is not sufficient to describe the object; you need the > class too. That's true both for the bean and any of it's bean-typed > properties, since a property might be typed with an interface or an > abstract class for which there is no constructor.
You could gen-class as needed to create concrete interface implementations or subclasses. This would probably be a terrible idea if unbean were for general use, but if you're focused on testing it could keep things cleaner (and prevent you cluttering up tests with irrelevant details). I suppose the most communicative approach would be to nest unbean calls, but make unbean support abstract classes and interfaces as its first argument. (If unbean inferred the need to gen-class, you couldn't tell from reading the test code whether a property of the top-level bean were a PersistentHashMap or some non-Clojure type being figured out behind the scenes.) -hume. -- http://elhumidor.blogspot.com/ --~--~---------~--~----~------------~-------~--~----~ 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 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 -~----------~----~----~----~------~----~------~--~---