本文整理汇总了C#中ITestSite.GetAdapter方法的典型用法代码示例。如果您正苦于以下问题:C# ITestSite.GetAdapter方法的具体用法?C# ITestSite.GetAdapter怎么用?C# ITestSite.GetAdapter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ITestSite
的用法示例。
在下文中一共展示了ITestSite.GetAdapter方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Initialized
/// <summary>
/// Initializes the RdpeiUtility class.
/// </summary>
/// <param name="tSite">Instance of ITestSite.</param>
public static void Initialized(ITestSite tSite)
{
if (Site == null)
{
Site = tSite;
rdpbcgrAdapter = Site.GetAdapter<IRdpbcgrAdapter>();
rdprfxAdapter = Site.GetAdapter<IRdprfxAdapter>();
}
}
示例2: InitializeHelper
/// <summary>
/// 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.
/// </summary>
/// <param name="siteInstance">A parameter represents the ITestSite instance.</param>
public static void InitializeHelper(ITestSite siteInstance)
{
TestSuiteHelper.CheckInputParameterNullOrEmpty<ITestSite>(siteInstance, "siteInstance", "InitializeHelper");
if (string.IsNullOrEmpty(currentTestClientName))
{
currentTestClientName = Common.GetConfigurationPropertyValue("TestClientName", siteInstance);
}
if (null == wopiSutControlAdapter)
{
wopiSutControlAdapter = siteInstance.GetAdapter<IMS_WOPISUTControlAdapter>();
}
if (null == wopiSutManagedCodeControlAdapter)
{
wopiSutManagedCodeControlAdapter = siteInstance.GetAdapter<IMS_WOPIManagedCodeSUTControlAdapter>();
}
if (null == wopiProtocolAdapter)
{
wopiProtocolAdapter = siteInstance.GetAdapter<IMS_WOPIAdapter>();
}
InitializeRequiredHelpers(wopiSutManagedCodeControlAdapter, siteInstance);
if (string.IsNullOrEmpty(relativeSourceFileUrl))
{
relativeSourceFileUrl = Common.GetConfigurationPropertyValue("NormalFile", siteInstance);
}
progId = Common.GetConfigurationPropertyValue("ProgIdForDiscoveryProcess", siteInstance);
// Setting the endpoint name according to the current http transport.
if (string.IsNullOrEmpty(currentSharedTestCasesEndpointName))
{
TransportProtocol currentTransport = Common.GetConfigurationPropertyValue<TransportProtocol>("TransportType", siteInstance);
switch (currentTransport)
{
case TransportProtocol.HTTP:
{
currentSharedTestCasesEndpointName = Common.GetConfigurationPropertyValue("SharedTestCaseEndPointNameForHTTP", siteInstance);
break;
}
case TransportProtocol.HTTPS:
{
currentSharedTestCasesEndpointName = Common.GetConfigurationPropertyValue("SharedTestCaseEndPointNameForHTTPS", siteInstance);
break;
}
default:
{
throw new InvalidOperationException(string.Format("The test suite only support HTTP or HTTPS transport. Current:[{0}]", currentTransport));
}
}
}
// Set the protocol name of current test suite
siteInstance.DefaultProtocolDocShortName = WopiProtocolShortName;
hasInitializedHelperStatus = true;
}