Skip to content

TRUNK-5709: Replace all instances of @should in community maintained modules #516

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ public class RadiologyProperties {
*
* @return dicom uid org root
* @throws IllegalStateException if global property for dicom uid org root cannot be found
* @should return dicom uid org root
* @should throw illegal state exception if global property for dicom uid org root cannot be found
* <strong>Should</strong> return dicom uid org root
* <strong>Should</strong> throw illegal state exception if global property for dicom uid org root cannot be found
*/
public String getDicomUIDOrgRoot() {
return getGlobalProperty(RadiologyConstants.GP_DICOM_UID_ORG_ROOT, true);
Expand All @@ -70,8 +70,8 @@ public String getDicomUIDOrgRoot() {
*
* @return DICOM web viewer address
* @throws IllegalStateException if global property for dicom web viewer address cannot be found
* @should return dicom web viewer address
* @should throw illegal state exception if global property for dicom web viewer address cannot
* <strong>Should</strong> return dicom web viewer address
* <strong>Should</strong> throw illegal state exception if global property for dicom web viewer address cannot
* be found
*/
public String getDicomWebViewerAddress() {
Expand All @@ -83,8 +83,8 @@ public String getDicomWebViewerAddress() {
*
* @return DICOM web viewer port
* @throws IllegalStateException if global property for dicom web viewer port cannot be found
* @should return dicom web viewer port
* @should throw illegal state exception if global property for dicom web viewer port cannot be
* <strong>Should</strong> return dicom web viewer port
* <strong>Should</strong> throw illegal state exception if global property for dicom web viewer port cannot be
* found
*/
public String getDicomWebViewerPort() {
Expand All @@ -97,8 +97,8 @@ public String getDicomWebViewerPort() {
* @return DICOM web viewer base url
* @throws IllegalStateException if global property for dicom web viewer base url cannot be
* found
* @should return dicom web viewer base url
* @should throw illegal state exception if global property for dicom web viewer base url cannot
* <strong>Should</strong> return dicom web viewer base url
* <strong>Should</strong> throw illegal state exception if global property for dicom web viewer base url cannot
* be found
*/
public String getDicomWebViewerBaseUrl() {
Expand All @@ -109,7 +109,7 @@ public String getDicomWebViewerBaseUrl() {
* Return DICOM web viewer local server name.
*
* @return DICOM web viewer local server name
* @should return dicom web viewer local server name
* <strong>Should</strong> return dicom web viewer local server name
*/
public String getDicomWebViewerLocalServerName() {
return getGlobalProperty(RadiologyConstants.GP_DICOM_WEB_VIEWER_LOCAL_SERVER_NAME, false);
Expand All @@ -119,10 +119,10 @@ public String getDicomWebViewerLocalServerName() {
* Get CareSetting for RadiologyOrder's
*
* @return CareSetting for radiology orders
* @should return radiology care setting
* @should throw illegal state exception if global property for radiology care setting cannot be
* <strong>Should</strong> return radiology care setting
* <strong>Should</strong> throw illegal state exception if global property for radiology care setting cannot be
* found
* @should throw illegal state exception if radiology care setting cannot be found
* <strong>Should</strong> throw illegal state exception if radiology care setting cannot be found
*/
public CareSetting getRadiologyCareSetting() {
final CareSetting result =
Expand All @@ -138,8 +138,8 @@ public CareSetting getRadiologyCareSetting() {
* Test order type for radiology order
*
* @return test order type for radiology order
* @should return order type for radiology test orders
* @should throw illegal state exception for non existing radiology test order type
* <strong>Should</strong> return order type for radiology test orders
* <strong>Should</strong> throw illegal state exception for non existing radiology test order type
*/
public OrderType getRadiologyTestOrderType() {
return orderService.getOrderTypeByUuid(getGlobalProperty(RadiologyConstants.GP_RADIOLOGY_TEST_ORDER_TYPE, true));
Expand All @@ -149,8 +149,8 @@ public OrderType getRadiologyTestOrderType() {
* Get EncounterType for RadiologyOrder's
*
* @return EncounterType for radiology orders
* @should return encounter type for radiology orders
* @should throw illegal state exception for non existing radiology encounter type
* <strong>Should</strong> return encounter type for radiology orders
* <strong>Should</strong> throw illegal state exception for non existing radiology encounter type
*/
public EncounterType getRadiologyOrderEncounterType() {
return encounterService
Expand All @@ -161,8 +161,8 @@ public EncounterType getRadiologyOrderEncounterType() {
* Get EncounterRole for the ordering provider
*
* @return EncounterRole for ordering provider
* @should return encounter role for ordering provider
* @should throw illegal state exception for non existing ordering provider encounter role
* <strong>Should</strong> return encounter role for ordering provider
* <strong>Should</strong> throw illegal state exception for non existing ordering provider encounter role
*/
public EncounterRole getRadiologyOrderingProviderEncounterRole() {
return encounterService.getEncounterRoleByUuid(
Expand All @@ -173,8 +173,8 @@ public EncounterRole getRadiologyOrderingProviderEncounterRole() {
* Get VisitType for RadiologyOrder's
*
* @return visitType for radiology orders
* @should return visit type for radiology orders
* @should throw illegal state exception for non existing radiology visit type
* <strong>Should</strong> return visit type for radiology orders
* <strong>Should</strong> throw illegal state exception for non existing radiology visit type
*/
public VisitType getRadiologyVisitType() {
return visitService.getVisitTypeByUuid(getGlobalProperty(RadiologyConstants.GP_RADIOLOGY_VISIT_TYPE, true));
Expand All @@ -189,14 +189,14 @@ public VisitType getRadiologyVisitType() {
* @throws IllegalStateException if global property radiologyConceptClasses is badly formatted
* @throws IllegalStateException if global property radiologyConceptClasses contains a UUID not found among concept
* classes
* @should throw illegal state exception if global property radiology concept classes is null
* @should throw illegal state exception if global property radiology concept classes is an empty
* <strong>Should</strong> throw illegal state exception if global property radiology concept classes is null
* <strong>Should</strong> throw illegal state exception if global property radiology concept classes is an empty
* string
* @should throw illegal state exception if global property radiology concept classes is badly
* <strong>Should</strong> throw illegal state exception if global property radiology concept classes is badly
* formatted
* @should throw illegal state exception if global property radiology concept classes contains a
* <strong>Should</strong> throw illegal state exception if global property radiology concept classes contains a
* UUID not found among concept classes
* @should return comma separated list of concept class names configured via concept class UUIDs
* <strong>Should</strong> return comma separated list of concept class names configured via concept class UUIDs
* in global property radiology concept classes
*/
public String getRadiologyConceptClassNames() {
Expand Down Expand Up @@ -231,16 +231,16 @@ public String getRadiologyConceptClassNames() {
* @throws IllegalStateException if global property radiologyOrderReasonConceptClasses is badly formatted
* @throws IllegalStateException if global property radiologyOrderReasonConceptClasses contains a UUID not found among
* concept classes
* @should throw illegal state exception if global property radiology order reason concept classes is badly formatted
* @should throw illegal state exception if global property radiology order reason concept classes contains a UUID not
* <strong>Should</strong> throw illegal state exception if global property radiology order reason concept classes is badly formatted
* <strong>Should</strong> throw illegal state exception if global property radiology order reason concept classes contains a UUID not
* found among concept classes
* @should return the name of the diagnosis concept class if global property radiology order reason concept classes is
* <strong>Should</strong> return the name of the diagnosis concept class if global property radiology order reason concept classes is
* null
* @should return the name of the diagnosis concept class if global property radiology order reason concept classes is an
* <strong>Should</strong> return the name of the diagnosis concept class if global property radiology order reason concept classes is an
* empty string
* @should return an empty string if global property radiology order reason concept classes is null or an empty string
* <strong>Should</strong> return an empty string if global property radiology order reason concept classes is null or an empty string
* and no diagnosis concept class is present
* @should return comma separated list of concept class names configured via concept class UUIDs in global property
* <strong>Should</strong> return comma separated list of concept class names configured via concept class UUIDs in global property
* radiology order reason concept classes
*/
public String getRadiologyOrderReasonConceptClassNames() {
Expand Down Expand Up @@ -283,9 +283,9 @@ public String getRadiologyOrderReasonConceptClassNames() {
* @param required indicates if the global property must be configured
* @return value of global property for given name
* @throws IllegalStateException if global property cannot be found
* @should return global property given valid global property name
* @should return null given non required and non configured global property
* @should throw illegal state exception given required non configured global property
* <strong>Should</strong> return global property given valid global property name
* <strong>Should</strong> return null given non required and non configured global property
* <strong>Should</strong> throw illegal state exception given required non configured global property
*/
private String getGlobalProperty(String globalPropertyName, boolean required) {
final String result = administrationService.getGlobalProperty(globalPropertyName);
Expand All @@ -300,9 +300,9 @@ private String getGlobalProperty(String globalPropertyName, boolean required) {
*
* @return templates folder
* @throws IllegalStateException if global property cannot be found
* @should create a directory under the openmrs application data directory if GP value is relative
* @should creates a directory at GP value if it is an absolute path
* @should throw illegal state exception if global property cannot be found
* <strong>Should</strong> create a directory under the openmrs application data directory if GP value is relative
* <strong>Should</strong> creates a directory at GP value if it is an absolute path
* <strong>Should</strong> throw illegal state exception if global property cannot be found
*/
public File getReportTemplateHome() {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public interface DicomUidGenerator {
* Allows users of the {@code DicomUidGenerator} to validate their {@code root's} length before using this generator.
*
* @return maximum allowed root length
* @should return maximum allowed root length
* <strong>Should</strong> return maximum allowed root length
*/
public int getMaxRootLength();

Expand All @@ -37,15 +37,15 @@ public interface DicomUidGenerator {
* @throws IllegalArgumentException if root is empty
* @throws IllegalArgumentException if the root is not a valid UID
* @throws IllegalArgumentException if the root exceeds the maximum length
* @should return a valid uid prefixed with root
* @should always return unique uids when called multiple times
* @should return a uid not exceeding 64 characters
* @should return a uid composed only of characters 0-9 separated by a dot
* @should return a uid with no non-significant leading zeros
* @should throw a null pointer exception if root is null
* @should throw an illegal argument exception if root is empty
* @should throw an illegal argument exception if root is not a valid UID
* @should throw an illegal argument exception if root exceeds the maximum length
* <strong>Should</strong> return a valid uid prefixed with root
* <strong>Should</strong> always return unique uids when called multiple times
* <strong>Should</strong> return a uid not exceeding 64 characters
* <strong>Should</strong> return a uid composed only of characters 0-9 separated by a dot
* <strong>Should</strong> return a uid with no non-significant leading zeros
* <strong>Should</strong> throw a null pointer exception if root is null
* <strong>Should</strong> throw an illegal argument exception if root is empty
* <strong>Should</strong> throw an illegal argument exception if root is not a valid UID
* <strong>Should</strong> throw an illegal argument exception if root exceeds the maximum length
*/
public String getNewDicomUid(String root);
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ public class DicomUidValidator {
*
* @param uid DICOM UID to be validated
* @return true if uid is a valid dicom uid and false otherwise
* @should return false given null
* @should return false given empty string
* @should return false for uid longer than 64 characters
* @should return false for uid containing characters other than 0-9 and dot separator
* @should return false for uid containing non-significant leading zeros
* @should return false for uid with trailing dot character
* @should return false for uid with characters other than 0-2 as first component
* @should return true for valid uid
* <strong>Should</strong> return false given null
* <strong>Should</strong> return false given empty string
* <strong>Should</strong> return false for uid longer than 64 characters
* <strong>Should</strong> return false for uid containing characters other than 0-9 and dot separator
* <strong>Should</strong> return false for uid containing non-significant leading zeros
* <strong>Should</strong> return false for uid with trailing dot character
* <strong>Should</strong> return false for uid with characters other than 0-2 as first component
* <strong>Should</strong> return true for valid uid
*/
public static boolean isValid(String uid) {

Expand All @@ -60,10 +60,10 @@ public static boolean isValid(String uid) {
*
* @param uid DICOM UID to be validated
* @return true if uid length is smaller or equal than 64 and false otherwise
* @should return false given null
* @should return false given empty string
* @should return false for uid length bigger than 64
* @should return true for uid length smaller or equal to 64
* <strong>Should</strong> return false given null
* <strong>Should</strong> return false given empty string
* <strong>Should</strong> return false for uid length bigger than 64
* <strong>Should</strong> return true for uid length smaller or equal to 64
*/
public static boolean isLengthValid(String uid) {

Expand All @@ -79,13 +79,13 @@ public static boolean isLengthValid(String uid) {
*
* @param uid DICOM UID to be validated
* @return true if uid pattern is valid and false otherwise
* @should return false given null
* @should return false given empty string
* @should return false for uid containing characters other than 0-9 and dot separator
* @should return false for uid containing non-significant leading zeros
* @should return false for uid with trailing dot character
* @should return false for uid with characters other than 0-2 as first component
* @should return true for valid uid
* <strong>Should</strong> return false given null
* <strong>Should</strong> return false given empty string
* <strong>Should</strong> return false for uid containing characters other than 0-9 and dot separator
* <strong>Should</strong> return false for uid containing non-significant leading zeros
* <strong>Should</strong> return false for uid with trailing dot character
* <strong>Should</strong> return false for uid with characters other than 0-2 as first component
* <strong>Should</strong> return true for valid uid
*/
public static boolean isPatternValid(String uid) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ public class DicomWebViewer {
* @param radiologyStudy RadiologyStudy for which DICOM web viewer URL should be created
* @throws IllegalArgumentException given null
* @throws IllegalArgumentException given a study with studyInstanceUid null
* @should return a url to open dicom images of the given study in the configured dicom viewer
* @should add query param server name to url if local server name is not blank
* @should throw an illegal argument exception given null
* @should throw an illegal argument exception given study with studyInstanceUid null
* <strong>Should</strong> return a url to open dicom images of the given study in the configured dicom viewer
* <strong>Should</strong> add query param server name to url if local server name is not blank
* <strong>Should</strong> throw an illegal argument exception given null
* <strong>Should</strong> throw an illegal argument exception given study with studyInstanceUid null
*/
public String getDicomViewerUrl(RadiologyStudy radiologyStudy) {
if (radiologyStudy == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ public enum PerformedProcedureStepStatus {
* @param performedProcedureStepStatus PerformedProcedureStepStatus for which the name is
* returned
* @return name of given PerformedProcedureStepStatus
* @should return name given performed procedure step status
* @should return unknown given null
* <strong>Should</strong> return name given performed procedure step status
* <strong>Should</strong> return unknown given null
*/
public static String getNameOrUnknown(PerformedProcedureStepStatus performedProcedureStepStatus) {
if (performedProcedureStepStatus == null) {
Expand All @@ -44,9 +44,9 @@ public static String getNameOrUnknown(PerformedProcedureStepStatus performedProc
* @param displayName name defined by DICOM standard for which the PerformedProcedureStepStatus is returned
* @return PerformedProcedureStepStatus PerformedProcedureStepStatus matching given displayName
* @throws IllegalArgumentException
* @should return performed procedure step status given display name
* @should return null given undefined display name
* @should throw IllegalArgumentException given null
* <strong>Should</strong> return performed procedure step status given display name
* <strong>Should</strong> return null given undefined display name
* <strong>Should</strong> throw IllegalArgumentException given null
*/
public static PerformedProcedureStepStatus getMatchForDisplayName(String displayName) throws IllegalArgumentException {
if (displayName == null) {
Expand Down
Loading