So end of the week 1 , I got many knowledge form the project and my mentor. I experienced test driven development in first time because of this project and my mentor did a huge effort to put me on a right track .
Basically my first task is to develop a test case for a method ( which inside the AttchmentService ) which fetch the attachments ( Complex obs ) based on the encounter .So first half of the test case was finished when i start my development. So inside that test method i need to check following things.
- Save in the same encounter: 2 obs, 2 non-Attachments managed complex obs and 2 Attachments-managed complex obs.
- Verify that the method only returns the two Attachments-managed ones.
- Edit the configuration and encompass one (or two) of the other complex obs to be also Attachments-managed.
- Verify that the method returns the two original Attachments-managed ones plus the one (or two) that were encompassed through the configuration change.
So for creating the 2 non-Attachments managed complex obs i used XML based test data loading mentioned here.And end of the week 1 i was able to accomplish this task and send for the review.