C# Class Microsoft.Protocols.TestSuites.MS_WWSP.AdapterHelper

This class contains common help methods.
Afficher le fichier Open project: OfficeDev/Interop-TestSuites

Méthodes publiques

Méthode Description
AreEquals ( this currentclaimResultInstance, ClaimReleaseTaskResponseClaimReleaseTaskResult targetclaimResultInstance ) : bool

It is extend method and used to compare fields' value between two instance of ClaimReleaseTaskResponseClaimReleaseTaskResult type.

GetAssociationDataFromTemplateItem ( string templateName, TemplateData templateData ) : XmlNode

Get the association data from specified templateItem in response of GetTemplatesForItem operation.

GetAttributeValueFromXml ( string attributeName, XmlNode xmlNode ) : string

Get attribute value from response data of an operation.

GetNodeFromXML ( string nodeName, XmlNode xmlNode ) : XmlNode

Get the specified XML node from the specified XML fragment.

GetWorkFlowTemplateItemByName ( string templateName, TemplateData templateData ) : TemplateDataWorkflowTemplate

Get the WorkFlow Template Item By specified Name

HasElement ( XmlElement xmlElement, string elementName ) : bool

The method is used to verify whether specified elementName is existed in the specified lastRawXml.

Initialize ( ITestSite currentSite ) : void

Initialize object of "Site".

IsValueValid ( long value, long bitMasks ) : bool

A method used to check if the specified value is zero or more combination of the bitmasks.

VerifyWorkflowAssociationSchema ( XmlNode workFlowAssociationData ) : void

Verify the schema definition for the workflow association data, if there is error in validation, method will throw an XmlSchemaValidationException.

Private Methods

Méthode Description
Combination ( long bitMasks, int countCom, List &combinations ) : bool

Get the combinations from the specified count of bitmasks.

GetCombinationsFromBitMasks ( long bitMasks ) : List

Get all the combinations of the bitmasks.

LoadWorkflowAssociationSchemas ( ) : List

Load the workflow Association Schema definitions

Method Details

AreEquals() public static méthode

It is extend method and used to compare fields' value between two instance of ClaimReleaseTaskResponseClaimReleaseTaskResult type.
public static AreEquals ( this currentclaimResultInstance, ClaimReleaseTaskResponseClaimReleaseTaskResult targetclaimResultInstance ) : bool
currentclaimResultInstance this A parameter represents the current instance of ClaimReleaseTaskResponseClaimReleaseTaskResult type.
targetclaimResultInstance ClaimReleaseTaskResponseClaimReleaseTaskResult A parameter represents the target instance of ClaimReleaseTaskResponseClaimReleaseTaskResult type which will be compared.
Résultat bool

GetAssociationDataFromTemplateItem() public static méthode

Get the association data from specified templateItem in response of GetTemplatesForItem operation.
public static GetAssociationDataFromTemplateItem ( string templateName, TemplateData templateData ) : XmlNode
templateName string A parameter represents the template name which will be used to find out the template item
templateData TemplateData A parameter represents response of GetTemplatesForItem operation which contains the association data.
Résultat System.Xml.XmlNode

GetAttributeValueFromXml() public static méthode

Get attribute value from response data of an operation.
public static GetAttributeValueFromXml ( string attributeName, XmlNode xmlNode ) : string
attributeName string The specified attribute name.
xmlNode System.Xml.XmlNode The response data of an operation.
Résultat string

GetNodeFromXML() public static méthode

Get the specified XML node from the specified XML fragment.
public static GetNodeFromXML ( string nodeName, XmlNode xmlNode ) : XmlNode
nodeName string The name of specified XML node.
xmlNode System.Xml.XmlNode The specified XML fragment.
Résultat System.Xml.XmlNode

GetWorkFlowTemplateItemByName() public static méthode

Get the WorkFlow Template Item By specified Name
public static GetWorkFlowTemplateItemByName ( string templateName, TemplateData templateData ) : TemplateDataWorkflowTemplate
templateName string A parameter represents the template name which will be used to find out the template item
templateData TemplateData A parameter represents response of GetTemplatesForItem operation.
Résultat TemplateDataWorkflowTemplate

HasElement() public static méthode

The method is used to verify whether specified elementName is existed in the specified lastRawXml.
public static HasElement ( XmlElement xmlElement, string elementName ) : bool
xmlElement System.Xml.XmlElement The XML element.
elementName string The element name which need to check whether it is existed.
Résultat bool

Initialize() public static méthode

Initialize object of "Site".
public static Initialize ( ITestSite currentSite ) : void
currentSite ITestSite An object provides logging, assertions, and SUT adapters for test code onto its execution context.
Résultat void

IsValueValid() public static méthode

A method used to check if the specified value is zero or more combination of the bitmasks.
public static IsValueValid ( long value, long bitMasks ) : bool
value long A parameter represents the value which is used to check.
bitMasks long A parameter represents the array which is used limit the value specified in value parameter
Résultat bool

VerifyWorkflowAssociationSchema() public static méthode

Verify the schema definition for the workflow association data, if there is error in validation, method will throw an XmlSchemaValidationException.
public static VerifyWorkflowAssociationSchema ( XmlNode workFlowAssociationData ) : void
workFlowAssociationData System.Xml.XmlNode A parameter represents the data of the association
Résultat void