C# Class Microsoft.Protocols.TestSuites.MS_WOPI.TestSuiteHelper

This class is used to support required functions for test class initialization and clean up
Inheritance: HelperBase
Show file Open project: OfficeDev/Interop-TestSuites Class Usage Examples

Public Methods

Method Description
CleanUpDiscoveryProcess ( string currentTestClient, IMS_WOPISUTControlAdapter sutControllerAdapterInstance ) : void

A method is used to clean the WOPI discovery process for the WOPI server.

GetFileNameFromFullUrl ( string fullUrlOfFile ) : string

This method is used to get the file name from the URL.

InitializeContextForShare ( string requestFileUrl, string userName, string password, string domain, CellStoreOperationType celloperationType, ITestSite site ) : void

This method is used to initialize the shared test cases' context.

InitializeHelper ( ITestSite siteInstance ) : void

This method is used to initialize the share test case helper. This method will also initialize all helpers which are required to initialize during test suite running.

InitializeTestSuite ( ITestSite testSite ) : void

A method used to initialize the test suite. It is used in test class level initialization.

MergeConfigurationFileForShare ( ITestSite siteInstance ) : void

This method is used to merge the configurations which are used by shared test cases.

MergeWOPIPtfConfigFiles ( ITestSite siteInstance ) : void

This method is used to merge the configuration of the WOPI PTF configuration files.

PerformDiscoveryProcess ( string currentTestClient, IMS_WOPISUTControlAdapter sutControllerAdapterInstance, ITestSite siteInstance ) : void

A method is used to perform the discovery process

PerformSupportCobaltCheck ( ITestSite siteInstance ) : void

A method is used to check whether the WOPI server Cobalt feature, this feature depends on that the WOPI server whether implements MS-FSSHTTP. If current WOPI server does support Cobalt feature, this method will capture related requirement R961, otherwise this method will raise an inconclusive assertion.

PerformSupportProductsCheck ( ITestSite site ) : void

A method is used to check whether the SUT product supports the MS-WOPI protocol. If the SUT does not support, this method will raise an inconclusive assertion.

VerifyRunInSupportProducts ( ITestSite siteInstance ) : bool

A method is used to verify whether test suite run in support products. If the value of "SutVersion" property in common configuration file is not included in "SupportProducts" property in "MS-WOPI_TestSuite.deployment.ptfconfig", the "MS-WOPI_Supported" SHOULDMAY property will always equal to false. And the unsupported initialization logic will not be executed in unsupported products.

Private Methods

Method Description
InitializeRequiredHelpers ( IMS_WOPIManagedCodeSUTControlAdapter sutManagedCodeControlAdpater, ITestSite siteInstance ) : void

A method is used to initialize all required helpers when calling the SharedCase helper. Normally, all this method will try to initial all helpers which are required to initialize.

TestSuiteHelper ( ) : System

Prevents a default instance of the TestSuiteHelper class from being created

Method Details

CleanUpDiscoveryProcess() public static method

A method is used to clean the WOPI discovery process for the WOPI server.
public static CleanUpDiscoveryProcess ( string currentTestClient, IMS_WOPISUTControlAdapter sutControllerAdapterInstance ) : void
currentTestClient string A parameter represents the test client name which is running the test suite. This test client act as WOPI client and response discovery request from the WOPI server successfully.
sutControllerAdapterInstance IMS_WOPISUTControlAdapter A parameter represents the IMS_WOPISUTControlAdapter instance which is used to make the WOPI server perform sending discovery request to the discovery listener.
return void

GetFileNameFromFullUrl() public static method

This method is used to get the file name from the URL.
public static GetFileNameFromFullUrl ( string fullUrlOfFile ) : string
fullUrlOfFile string A parameter represents the full URL of the file.
return string

InitializeContextForShare() public static method

This method is used to initialize the shared test cases' context.
public static InitializeContextForShare ( string requestFileUrl, string userName, string password, string domain, CellStoreOperationType celloperationType, ITestSite site ) : void
requestFileUrl string A parameter represents the file URL.
userName string A parameter represents the user name we used.
password string A parameter represents the password of the user.
domain string A parameter represents the domain.
celloperationType CellStoreOperationType A parameter represents the type of CellStore operation which is used to determine different initialize logic.
site ITestSite A parameter represents the site.
return void

InitializeHelper() public static method

This method is used to initialize the share test case helper. This method will also initialize all helpers which are required to initialize during test suite running.
public static InitializeHelper ( ITestSite siteInstance ) : void
siteInstance ITestSite A parameter represents the ITestSite instance.
return void

InitializeTestSuite() public static method

A method used to initialize the test suite. It is used in test class level initialization.
public static InitializeTestSuite ( ITestSite testSite ) : void
testSite ITestSite A parameter represents the ITestSite instance which contain the test context information.
return void

MergeConfigurationFileForShare() public static method

This method is used to merge the configurations which are used by shared test cases.
public static MergeConfigurationFileForShare ( ITestSite siteInstance ) : void
siteInstance ITestSite A parameter represents the site.
return void

MergeWOPIPtfConfigFiles() public static method

This method is used to merge the configuration of the WOPI PTF configuration files.
public static MergeWOPIPtfConfigFiles ( ITestSite siteInstance ) : void
siteInstance ITestSite A parameter represents the site.
return void

PerformDiscoveryProcess() public static method

A method is used to perform the discovery process
public static PerformDiscoveryProcess ( string currentTestClient, IMS_WOPISUTControlAdapter sutControllerAdapterInstance, ITestSite siteInstance ) : void
currentTestClient string A parameter represents the current test client which is listening the discovery request.
sutControllerAdapterInstance IMS_WOPISUTControlAdapter A parameter represents the IMS_WOPISUTControlAdapter instance which is used to make the WOPI server perform sending discovery request to the discovery listener.
siteInstance ITestSite A parameter represents the ITestSite instance which is used to get the test context.
return void

PerformSupportCobaltCheck() public static method

A method is used to check whether the WOPI server Cobalt feature, this feature depends on that the WOPI server whether implements MS-FSSHTTP. If current WOPI server does support Cobalt feature, this method will capture related requirement R961, otherwise this method will raise an inconclusive assertion.
public static PerformSupportCobaltCheck ( ITestSite siteInstance ) : void
siteInstance ITestSite A parameter represents the site instance.
return void

PerformSupportProductsCheck() public static method

A method is used to check whether the SUT product supports the MS-WOPI protocol. If the SUT does not support, this method will raise an inconclusive assertion.
public static PerformSupportProductsCheck ( ITestSite site ) : void
site ITestSite A parameter represents the site.
return void

VerifyRunInSupportProducts() public static method

A method is used to verify whether test suite run in support products. If the value of "SutVersion" property in common configuration file is not included in "SupportProducts" property in "MS-WOPI_TestSuite.deployment.ptfconfig", the "MS-WOPI_Supported" SHOULDMAY property will always equal to false. And the unsupported initialization logic will not be executed in unsupported products.
public static VerifyRunInSupportProducts ( ITestSite siteInstance ) : bool
siteInstance ITestSite A parameter represents the site instance.
return bool