I'm a little unclear as to what your specific challenge is. I understand
you're trying to test fns that take a map produced by the JSON parser, and
extract specific fields.

Would it be sufficient to just create literal maps to fake the output of
the JSON parser, use those as inputs to your extraction fns, and then just
compare the output to what you expected? If the issue is that the
extraction isn't done by top-level fns, and thus is hard to test, perhaps
you could just make them top-level fns?

Cheers,

Chris


On 19 April 2013 15:14, Jonathon McKitrick <jmckitr...@gmail.com> wrote:

> As a relatively new Clojure user, I have a relatively simple app which
> parses a complex JSON structure into a database.
>
> I have test code which verifies all the basic database functions, but I'm
> not sure how best to exercise all the parsing code.  The JSON parser is
> built-in, and most of my code is navigating each structure, picking out
> fields of interest to build the objects for the database.
>
> What would be a good strategy for tests that would exercise this
> intermediate layer of the app, between the JSON and the database, where the
> heart of the app logic actually lies?
>
> --
> --
> 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
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to