On Wed, May 06, 2020 at 12:01:54PM +1200, Kim Shepherd wrote:
> Thanks both
> In this case the test is to prove that I can correctly parse SHERPA's JSON
> responses from their API and populate the java objects we use for SHERPA
> journal / policy / publisher handling later on.
> So the JSON file is just an example response (one for a journal lookup, one
> for a publisher lookup) from SHERPA itself, saved to disk, so we can still
> test the JSON parsing without talking to the real API.
> I probably could mock up a JSONObject as well, but this just feels like a
> more realistic test? It's not hand-crafted JSON at least :)

Yes, in this particular case it's probably best to use an actual
sample from the remote service, and certainly better than sending real
network requests during a unit test.  OTOH we'll have to be sensitive
to changes in the actual response over time.

-- 
Mark H. Wood
Lead Technology Analyst

University Library
Indiana University - Purdue University Indianapolis
755 W. Michigan Street
Indianapolis, IN 46202
317-274-0749
www.ulib.iupui.edu

-- 
All messages to this mailing list should adhere to the DuraSpace Code of 
Conduct: https://duraspace.org/about/policies/code-of-conduct/
--- 
You received this message because you are subscribed to the Google Groups 
"DSpace Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dspace-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dspace-devel/20200511120840.GB11106%40IUPUI.Edu.

Attachment: signature.asc
Description: PGP signature

Reply via email to