rayfarias56 / minrva-estimote-server

The server for the Minrva: Wayfinder app
0 stars 1 forks source link

Add tests #6

Closed rayfarias56 closed 8 years ago

rayfarias56 commented 8 years ago

I know I'm ignoring TDD, but tests should be added to test the Api.

See: http://stackoverflow.com/questions/21413738/unit-testing-jersey-restful-services for some ideas on testing frameworks for Jersey.

rayfarias56 commented 8 years ago

As far as writing actual tests, I have written a proof of concept of tests. Things can also be tested by throwing exceptions (see here). Unfortunately, evaluating what to test on the server as far as unit tests would be the resource files. However, that would simply test that it the resource method responded to a return value correctly. There is no logic to test in any of the resources. This leaves logic to be tested in integration tests that also test what occurs in the database or when looking for an Ebook url. Unfortunately, this is out of scope of the time I have and not necessarily desired by the client.