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

This class contains common help methods.
显示文件 Open project: OfficeDev/Interop-TestSuites

Public Methods

Method 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

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

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.
return bool

GetAssociationDataFromTemplateItem() public static method

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.
return System.Xml.XmlNode

GetAttributeValueFromXml() public static method

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

GetNodeFromXML() public static method

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.
return System.Xml.XmlNode

GetWorkFlowTemplateItemByName() public static method

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.
return TemplateDataWorkflowTemplate

HasElement() public static method

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.
return bool

Initialize() public static method

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

IsValueValid() public static method

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

VerifyWorkflowAssociationSchema() public static method

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