C# Class Microsoft.Protocols.TestSuites.MS_COPYS.MS_COPYSAdapter

The partial class of adapter of MS-COPYS, it implements the adapter capture code.
Show file Open project: OfficeDev/Interop-TestSuites

Public Methods

Method Description
CopyIntoItems ( string sourceUrl, string destinationUrls, FieldInformation fields, byte rawStreamValue ) : CopyIntoItemsResponse

A method used to copy a file to a destination server that is different from the source location.

CopyIntoItemsLocal ( string sourceUrl, string destinationUrls ) : CopyIntoItemsLocalResponse

A method is used to copy a file when the destination of the operation is on the same protocol server as the source location.

GetItem ( string url ) : GetItemResponse

A method is used to retrieve the contents and metadata for a file from the specified location.

Initialize ( ITestSite testSite ) : void

Overrides the ManagedAdapterBase class' Initialize() method, it is used to initialize the adapter.

SwitchTargetServiceLocation ( ServiceLocation serviceLocation ) : void

Switch the target service location. The adapter will send the MS-COPYS message to specified service location.

SwitchUser ( string userName, string password, string domain ) : void

Switch the current credentials of the protocol adapter by specified user. After perform this method, all protocol operations will be performed by specified user.

Private Methods

Method Description
GetTargetServiceUrl ( ServiceLocation serviceLocation ) : string

A method used to get the target service url by specified service location.

VerifyCopyIntoItemsLocalOperationCapture ( CopyIntoItemsLocalResponse response, string destinationUrlsInRequest ) : void

A method used to verify CopyIntoItemsLocal operation related captures.

VerifyCopyIntoItemsOperationCapture ( CopyIntoItemsResponse response, string destinationUrlsInRequest ) : void

A method used to verify CopyIntoItems operation related captures.

VerifyCopyResultCollection ( CopyResult copyResultCollection, string destinationUrlsInRequest ) : void

A method used to verify the CopyResultCollection type.

VerifyFieldInformation ( FieldInformation fieldInformationItem ) : void

A method used to verify field information related requirements.

VerifyFieldInfromationCollection ( FieldInformation fieldInfromationCollection ) : void

A method used to verify field information collection and all field items in this collection.

VerifyGetItemOperationCapture ( GetItemResponse responseOfGetItem ) : void

A method used to verify GetItem operation related captures.

VerifyInternalNameOfField ( string internalName ) : bool

A method used to verify the internal name of a field whether is ASCII string, its length is fewer than 256 and does not contain any space.

VerifyTransPortAndSOAPCapture ( ) : void

A method used to verify the transPort and SOAP related captures.

Method Details

CopyIntoItems() public method

A method used to copy a file to a destination server that is different from the source location.
public CopyIntoItems ( string sourceUrl, string destinationUrls, FieldInformation fields, byte rawStreamValue ) : CopyIntoItemsResponse
sourceUrl string A parameter represents the absolute URL of the file in the source location.
destinationUrls string A parameter represents a collection of locations on the destination server.
fields FieldInformation A parameter represents a collection of the metadata for the file.
rawStreamValue byte A parameter represents the contents of the file. The contents will be encoded in Base64 format and sent in request.
return CopyIntoItemsResponse

CopyIntoItemsLocal() public method

A method is used to copy a file when the destination of the operation is on the same protocol server as the source location.
public CopyIntoItemsLocal ( string sourceUrl, string destinationUrls ) : CopyIntoItemsLocalResponse
sourceUrl string A parameter represents the location of the file in the source location.
destinationUrls string A parameter represents a collection of destination location. The operation will try to copy files to that locations.
return CopyIntoItemsLocalResponse

GetItem() public method

A method is used to retrieve the contents and metadata for a file from the specified location.
public GetItem ( string url ) : GetItemResponse
url string A parameter represents the location of the file.
return GetItemResponse

Initialize() public method

Overrides the ManagedAdapterBase class' Initialize() method, it is used to initialize the adapter.
public Initialize ( ITestSite testSite ) : void
testSite ITestSite A parameter represents the ITestSite instance, which is used to visit the test context.
return void

SwitchTargetServiceLocation() public method

Switch the target service location. The adapter will send the MS-COPYS message to specified service location.
public SwitchTargetServiceLocation ( ServiceLocation serviceLocation ) : void
serviceLocation ServiceLocation A parameter represents the service location which host the MS-COPYS service.
return void

SwitchUser() public method

Switch the current credentials of the protocol adapter by specified user. After perform this method, all protocol operations will be performed by specified user.
public SwitchUser ( string userName, string password, string domain ) : void
userName string A parameter represents the user name.
password string A parameter represents the password of the user.
domain string A parameter represents the domain of the user.
return void