C# Класс Microsoft.Protocols.TestSuites.MS_VERSS.AdapterHelper

The class provides the methods to assist MS-VERSSAdapter.
Показать файл Открыть проект

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

Метод Описание
AreVersionsResultEqual ( VersionData expect, VersionData actual ) : bool

Verify whether the expected versions from GetVersions operation are equal to the responses of other operations.

AreVersionsResultEqual ( string expect, VersionData actual ) : bool

Verify whether the expected versions from GetFileVersions are equal to the actual operation response.

ConstructDocFileFullUrl ( Uri requestUrl, string docLibName, string docName ) : Uri

Generate a doc full URL.

ExtractErrorStringFromSoapFault ( System.Web.Services.Protocols.SoapException exception ) : string

This method is used to extract error string from soap fault.

GetCurrentVersion ( VersionData versions ) : string

Get the current version.

GetPreviousVersion ( VersionData versions ) : string

Get the latest version that is less than the current version.

GetSchemaStringFromXsdFile ( string schemaFilePath ) : string

A method used to get the schema from XSD file. It is designed to read schema definition from XSD file.

Initialize ( ITestSite testSite ) : void

Initialize the AdapterHelper class.

IsCurrentVersionIncreased ( string oldVersion, string currentVersion ) : bool

Check whether the current version was increased.

IsExistElementInSoapBody ( string soapBody, string elementName ) : bool

Verify whether the specified element exists in SOAP body.

IsVersionExist ( VersionData versions, string version ) : bool

Verify whether the specified version exists in all the versions of the file.

ValidateAbsoluteUrlFormat ( Uri url ) : bool

This method is used to verify URL format.

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

Метод Описание
AreVersionNumberEqual ( Collection versionsA, Collection versionsB ) : bool

Verify whether the two version numbers are equal.

CompareVersionNumber ( string versionA, string versionB ) : int

Compare the version numbers.

ConvertVersionDataArrayToVersionNumberCollection ( VersionData versionDataArray ) : Collection

Convert an array of VersionData object to a version numbers collection.

ConvertVersionDataToString ( VersionData versionDataArray ) : string

Convert an array of VersionData to string.

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

AreVersionsResultEqual() публичный статический Метод

Verify whether the expected versions from GetVersions operation are equal to the responses of other operations.
public static AreVersionsResultEqual ( VersionData expect, VersionData actual ) : bool
expect VersionData The expected versions from GetVersions operation response.
actual VersionData The actual versions from other operations response.
Результат bool

AreVersionsResultEqual() публичный статический Метод

Verify whether the expected versions from GetFileVersions are equal to the actual operation response.
public static AreVersionsResultEqual ( string expect, VersionData actual ) : bool
expect string The expected version from GetFileVersions method.
actual VersionData The actual version from operation response.
Результат bool

ConstructDocFileFullUrl() публичный статический Метод

Generate a doc full URL.
public static ConstructDocFileFullUrl ( Uri requestUrl, string docLibName, string docName ) : Uri
requestUrl System.Uri A Uri indicates the absolute URL for the site collection.
docLibName string The name of library in which a document will be created.
docName string The name of document that will be created.
Результат System.Uri

ExtractErrorStringFromSoapFault() публичный статический Метод

This method is used to extract error string from soap fault.
public static ExtractErrorStringFromSoapFault ( System.Web.Services.Protocols.SoapException exception ) : string
exception System.Web.Services.Protocols.SoapException The soap fault that returned from server.
Результат string

GetCurrentVersion() публичный статический Метод

Get the current version.
public static GetCurrentVersion ( VersionData versions ) : string
versions VersionData All the versions of file.
Результат string

GetPreviousVersion() публичный статический Метод

Get the latest version that is less than the current version.
public static GetPreviousVersion ( VersionData versions ) : string
versions VersionData The versions of specified file.
Результат string

GetSchemaStringFromXsdFile() публичный статический Метод

A method used to get the schema from XSD file. It is designed to read schema definition from XSD file.
public static GetSchemaStringFromXsdFile ( string schemaFilePath ) : string
schemaFilePath string A parameter represents a XSD file path where the schema definitions should be loaded.
Результат string

Initialize() публичный статический Метод

Initialize the AdapterHelper class.
public static Initialize ( ITestSite testSite ) : void
testSite ITestSite The instance of ITestSite.
Результат void

IsCurrentVersionIncreased() публичный статический Метод

Check whether the current version was increased.
public static IsCurrentVersionIncreased ( string oldVersion, string currentVersion ) : bool
oldVersion string The old version.
currentVersion string The current version.
Результат bool

IsExistElementInSoapBody() публичный статический Метод

Verify whether the specified element exists in SOAP body.
public static IsExistElementInSoapBody ( string soapBody, string elementName ) : bool
soapBody string A string value indicates the SOAP body.
elementName string A string value indicates the element name.
Результат bool

IsVersionExist() публичный статический Метод

Verify whether the specified version exists in all the versions of the file.
public static IsVersionExist ( VersionData versions, string version ) : bool
versions VersionData All the versions of file.
version string The specified version number which will be checked.
Результат bool

ValidateAbsoluteUrlFormat() публичный статический Метод

This method is used to verify URL format.
public static ValidateAbsoluteUrlFormat ( Uri url ) : bool
url System.Uri The URL to be verified
Результат bool