C# Класс gov.va.medora.utils.mock.MockXmlSource

Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
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

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
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

Описание методов

MockXmlSource() публичный Метод

Constructs a MockXmlSource
public MockXmlSource ( string siteId ) : System
siteId string
Результат System

MockXmlSource() публичный Метод

public MockXmlSource ( string siteId, bool updateRpc ) : System
siteId string
updateRpc bool
Результат System

addRequest() публичный Метод

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
Результат void

query() публичный Метод

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
Результат string

query2() публичный Метод

public query2 ( MdoQuery mq ) : void
mq gov.va.medora.mdo.MdoQuery
Результат void