C# Class Microsoft.Protocols.TestSuites.MS_WDVMODUU.MS_WDVMODUUAdapter

Adapter class of MS-WDVMODUU.
Inheritance: Microsoft.Protocols.TestTools.ManagedAdapterBase, IMS_WDVMODUUAdapter
Show file Open project: OfficeDev/Interop-TestSuites

Public Methods

Method Description
Delete ( string requestUri, NameValueCollection headersCollection ) : WDVMODUUResponse

The method is used to send a HTTP request using DELETE method to the protocol server. As a result, it will return the "HttpWebResponse" object received from the protocol server.

Get ( string requestUri, NameValueCollection headersCollection ) : WDVMODUUResponse

The method is used to send a HTTP request using GET method to the protocol server. As a result, it will return the "HttpWebResponse" object received from the protocol server.

Initialize ( ITestSite testSite ) : void

Override IAdapter's Initialize(), set default protocol short name of the testSite, and initialize variables in "MS_WDVMODUUAdapter" class.

PropFind ( string requestUri, string body, NameValueCollection headersCollection ) : WDVMODUUResponse

The method is used to send a HTTP request using PROPFIND method to the protocol server. As a result, it will return the "HttpWebResponse" object received from the protocol server.

Put ( string requestUri, byte body, NameValueCollection headersCollection ) : WDVMODUUResponse

The method is used to send a HTTP request using PUT method to the protocol server. As a result, it will return the "HttpWebResponse" object received from the protocol server.

Private Methods

Method Description
AssertWDVMODUUResponse ( WDVMODUUResponse responseWDVMODUU ) : void

Assert the return object 'WDVMODUUResponse' is not null, make sure all necessary members in the object are not null.

ConstructHttpWebRequest ( string requestUri ) : HttpWebRequest

Construct an "HttpWebRequest" object based on a request URI.

GetResponse ( HttpWebRequest httpRequest ) : HttpWebResponse

Get the HTTP response via sending the HTTP request in input parameter "httpRequest".

ReserveRequestData ( HttpWebRequest httpRequest, string httpBodyString ) : void

Reserve the HTTP headers and body content from the HTTP request.

ValidateAndCaptureTransport ( HttpWebResponse httpResponse ) : void

Validate and capture the requirement about the transport, this protocol only support HTTP as transport now.

Method Details

Delete() public method

The method is used to send a HTTP request using DELETE method to the protocol server. As a result, it will return the "HttpWebResponse" object received from the protocol server.
public Delete ( string requestUri, NameValueCollection headersCollection ) : WDVMODUUResponse
requestUri string The resource Request_URI for the HTTP request.
headersCollection System.Collections.Specialized.NameValueCollection The collections for Name/Value pair of headers that would be inserted in the header of the HTTP request.
return WDVMODUUResponse

Get() public method

The method is used to send a HTTP request using GET method to the protocol server. As a result, it will return the "HttpWebResponse" object received from the protocol server.
public Get ( string requestUri, NameValueCollection headersCollection ) : WDVMODUUResponse
requestUri string The resource Request_URI for the HTTP request.
headersCollection System.Collections.Specialized.NameValueCollection The collections for Name/Value pair of headers that would be inserted in the header of the HTTP request.
return WDVMODUUResponse

Initialize() public method

Override IAdapter's Initialize(), set default protocol short name of the testSite, and initialize variables in "MS_WDVMODUUAdapter" class.
public Initialize ( ITestSite testSite ) : void
testSite ITestSite Transfer ITestSite into adapter, make adapter can use ITestSite's function.
return void

PropFind() public method

The method is used to send a HTTP request using PROPFIND method to the protocol server. As a result, it will return the "HttpWebResponse" object received from the protocol server.
public PropFind ( string requestUri, string body, NameValueCollection headersCollection ) : WDVMODUUResponse
requestUri string The resource Request_URI for the HTTP request.
body string The body content in the HTTP request.
headersCollection System.Collections.Specialized.NameValueCollection The collections for Name/Value pair of headers that would be inserted in the header of the HTTP request.
return WDVMODUUResponse

Put() public method

The method is used to send a HTTP request using PUT method to the protocol server. As a result, it will return the "HttpWebResponse" object received from the protocol server.
public Put ( string requestUri, byte body, NameValueCollection headersCollection ) : WDVMODUUResponse
requestUri string The resource Request_URI for the HTTP request.
body byte The body content in the HTTP request.
headersCollection System.Collections.Specialized.NameValueCollection The collections for Name/Value pair of headers that would be inserted in the header of the HTTP request.
return WDVMODUUResponse