GSOC 2018 with OpenMRS — Week 12

Ridmal Madushanka
Aug 8, 2018 · 1 min read

In this week i mainly focus on the mock testing with Mokito for Attachment Resource DoSearch() method. I finish the implementation of the do Search method with some modifications such as create separate context independent search method inside the AttachmentResource which will help to fetch the Attachments using AttachmentService based on the given Parameters. And also this Search method was created for help the mock testing implementation since it is context independent.

So Basically inside the Mock Test class, it test the newly added Search method with the different scenarios ( By changing the parameters ) and verify that relevant methods in the AttachmentService is triggered.Since we already developed the unit test for each method in the AttachmentService , we avoided testing the accuracy of the search method again by using Attachments. We just verify that relevant methods in the AttachmentService will triggered when we call the Search method with different parameters. All the new modifications are send to the mentor for review and wait for his feedbacks.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch

Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore

Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store