C# Class gov.va.medora.utils.mock.MockXmlSource

Afficher le fichier Open project: OSEHRA/mdo Class Usage Examples

Private Properties

Свойство Type Description
addQuery void
addUpdateResponseNode void
getParamValue string
getRequestIdentifiers void
getResponse string
isFileWorthy bool
loadXml void
saveSource void
selectRpc System.Xml.XmlNode
updateQuery void
updateRequestRpc void
updateResponse void
verifyStoredRequest void

Méthodes publiques

Méthode Description
MockXmlSource ( string siteId ) : System

Constructs a MockXmlSource

MockXmlSource ( string siteId, bool updateRpc ) : System
addRequest ( MdoQuery mq, string response, bool update ) : void

Adds the request/response to the document or saves the response to an external file

query ( MdoQuery mq ) : string

Performs the mock query, retrieving the result from the preloaded XML document but throws an exception if the document does not contain the call

query2 ( MdoQuery mq ) : void

Private Methods

Méthode Description
addQuery ( string rpcName, ArrayList rpcParams, string request, string response ) : void

Adds a query to the mock connection file

addUpdateResponseNode ( XmlNode node, string request, string response ) : void

Adds or updates an existing query node in the mock connection file

getParamValue ( VistaQuery param ) : string

Generate the value to store in the paramenter attribute if the param type is a list, a hashcode will be generated from that list

getRequestIdentifiers ( MdoQuery mq, string &xpath, string &request ) : void

Load the parameters which identify the request

getResponse ( XmlNode query ) : string

Get the response from the selected query node

isFileWorthy ( string response ) : bool

Checks the response to see if it is multi line

loadXml ( string path ) : void
saveSource ( ) : void
selectRpc ( string xpath ) : XmlNode

Looks up the query with the xpath

updateQuery ( XmlNode query, string request, string response ) : void

Updates a query in the mock connection file

updateRequestRpc ( XmlNode query, string request ) : void
updateResponse ( XmlNode query, string request, string response ) : void
verifyStoredRequest ( XmlNode query, string request ) : void

Validates the saved request string matches the vq.buildMessage() string

Method Details

MockXmlSource() public méthode

Constructs a MockXmlSource
public MockXmlSource ( string siteId ) : System
siteId string
Résultat System

MockXmlSource() public méthode

public MockXmlSource ( string siteId, bool updateRpc ) : System
siteId string
updateRpc bool
Résultat System

addRequest() public méthode

Adds the request/response to the document or saves the response to an external file
public addRequest ( MdoQuery mq, string response, bool update ) : void
mq gov.va.medora.mdo.MdoQuery
response string the response for the request
update bool
Résultat void

query() public méthode

Performs the mock query, retrieving the result from the preloaded XML document but throws an exception if the document does not contain the call
public query ( MdoQuery mq ) : string
mq gov.va.medora.mdo.MdoQuery
Résultat string

query2() public méthode

public query2 ( MdoQuery mq ) : void
mq gov.va.medora.mdo.MdoQuery
Résultat void