Hi devs,
I am working on the introductory ticket
TRUNK-248<https://tickets.openmrs.org/browse/TRUNK-248>which needs
adding @should notations according to code comments. I was
trying this with few classes, there are some things i need to clarify.
As an example i came across this
org.openmrs.api.db.hibernate.PatientSearchCriteria class which has
following method.
/**
* Utility method to add identifier expression to an existing criteria
*
* @param criteria
* @param identifier
* @param identifierTypes
* @param matchIdentifierExactly
*/
private void addIdentifierCriterias(Criteria criteria, String
identifier, List<PatientIdentifierType>
identifierTypes,
boolean matchIdentifierExactly) {
*// TODO add junit test for searching on voided identifiers*
According to the
guide<https://wiki.openmrs.org/display/docs/Unit+Testing+With+at-should+Annotation>provided
in the ticket, this should be annotated as,
/**
* Utility method to add identifier expression to an existing criteria
*
* @param criteria
* @param identifier
* @param identifierTypes
* @param matchIdentifierExactly
* *@should fail given null identifier*
*/
In addition to that it says there must be a method in the test class named *
addIdentifierCriterias_shouldFailGivenNullIdentifier()* which address this
check. However there is no PatientSearchCriteriaTest class in the project.
Do i need to create test classes and methods along with the fix for the
error ? or is it only needed to change the code comment and add the
annotation without considering modifying the test class method?
Thank you very much!
Ishara
--
*Best Regards.*
*Ishara Premadasa,*
Final Year Undergraduate,
Dept. of Computer Science & Engineering,
University of Moratuwa
Sri Lanka.
http://isharapremadasa.blogspot.com
_________________________________________
To unsubscribe from OpenMRS Developers' mailing list, send an e-mail to
[email protected] with "SIGNOFF openmrs-devel-l" in the body (not
the subject) of your e-mail.
[mailto:[email protected]?body=SIGNOFF%20openmrs-devel-l]