C# 클래스 Microsoft.Protocols.TestSuites.MS_VERSS.AdapterHelper

The class provides the methods to assist MS-VERSSAdapter.
파일 보기 프로젝트 열기: OfficeDev/Interop-TestSuites

공개 메소드들

메소드 설명
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