Class HttpMessageFactory
java.lang.Object
de.gematik.ncpeh.api.mock.builder.HttpMessageFactory
Static methods used to create test data, to be returned by API operations
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic PseudoHttpRequestBuild an HTTP request to be used as payload in theSimulatorCommunicationData.requestSend()element for theNcpehSimulatorApi.findDocuments(FindDocumentsRequest)response.static PseudoHttpResponseBuild an HTTP response to be used as payload in theSimulatorCommunicationData.responseReceived()element in the context of theNcpehSimulatorApi.findDocuments(FindDocumentsRequest)operation.static PseudoHttpRequestBuild an HTTP request to be used as payload in theSimulatorCommunicationData.requestSend()element for theNcpehSimulatorApi.identifyPatient(IdentifyPatientRequest)response.static PseudoHttpResponseBuild an HTTP response to be used as payload in theSimulatorCommunicationData.responseReceived()element for theNcpehSimulatorApi.identifyPatient(IdentifyPatientRequest)response.static PseudoHttpRequestBuild an HTTP request to be used as payload in theSimulatorCommunicationData.requestSend()element for theNcpehSimulatorApi.retrieveDocument(RetrieveDocumentRequest)response.static PseudoHttpResponseBuild an HTTP response to be used as payload in theSimulatorCommunicationData.responseReceived()element for theNcpehSimulatorApi.retrieveDocument(RetrieveDocumentRequest)response.static StringreadFileContentFromPath(String filePath) Read the content of a file at the given path into a String.
The encoding of the file must be UTF-8.
-
Field Details
-
RESOURCES_FOLDER
- See Also:
-
SPRING_BOOT_CLASSES_FOLDER
- See Also:
-
MESSAGES_FOLDER
- See Also:
-
PATIENT_IDENTIFICATION_REQUEST_FILE_NAME
- See Also:
-
PATIENT_IDENTIFICATION_RESPONSE_FILE_NAME
- See Also:
-
FIND_DOCUMENT_REQUEST_FILE_NAME
- See Also:
-
FIND_DOCUMENT_RESPONSE_FILE_NAME
- See Also:
-
RETRIEVE_DOCUMENT_REQUEST_FILE_NAME
- See Also:
-
RETRIEVE_DOCUMENT_RESPONSE_FILE_NAME
- See Also:
-
-
Constructor Details
-
HttpMessageFactory
public HttpMessageFactory()
-
-
Method Details
-
buildStandardIdentifyPatientRequest
Build an HTTP request to be used as payload in theSimulatorCommunicationData.requestSend()element for theNcpehSimulatorApi.identifyPatient(IdentifyPatientRequest)response.- Returns:
PseudoHttpRequest
-
buildStandardFindDocumentRequest
Build an HTTP request to be used as payload in theSimulatorCommunicationData.requestSend()element for theNcpehSimulatorApi.findDocuments(FindDocumentsRequest)response.- Returns:
PseudoHttpRequest
-
buildStandardRetrieveDocumentRequest
Build an HTTP request to be used as payload in theSimulatorCommunicationData.requestSend()element for theNcpehSimulatorApi.retrieveDocument(RetrieveDocumentRequest)response.- Returns:
PseudoHttpRequest
-
buildStandardIdentifyPatientResponse
Build an HTTP response to be used as payload in theSimulatorCommunicationData.responseReceived()element for theNcpehSimulatorApi.identifyPatient(IdentifyPatientRequest)response.- Returns:
PseudoHttpResponse
-
buildStandardFindDocumentResponse
Build an HTTP response to be used as payload in theSimulatorCommunicationData.responseReceived()element in the context of theNcpehSimulatorApi.findDocuments(FindDocumentsRequest)operation.- Returns:
PseudoHttpResponse
-
buildStandardRetrieveDocumentResponse
Build an HTTP response to be used as payload in theSimulatorCommunicationData.responseReceived()element for theNcpehSimulatorApi.retrieveDocument(RetrieveDocumentRequest)response.- Returns:
PseudoHttpResponse
-
readFileContentFromPath
Read the content of a file at the given path into a String.
The encoding of the file must be UTF-8.- Parameters:
filePath- path of the file to read- Returns:
- the file content as
String
-