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

ファイルを表示 Open project: OSEHRA/mdo Class Usage Examples

Private Properties

Property 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

Public Methods

Method 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

Method 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 method

Constructs a MockXmlSource
public MockXmlSource ( string siteId ) : System
siteId string
return System

MockXmlSource() public method

public MockXmlSource ( string siteId, bool updateRpc ) : System
siteId string
updateRpc bool
return System

addRequest() public method

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
return void

query() public method

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
return string

query2() public method

public query2 ( MdoQuery mq ) : void
mq gov.va.medora.mdo.MdoQuery
return void