当前位置: 首页>>代码示例>>C#>>正文


C# ITestSite.GetAdapter方法代码示例

本文整理汇总了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>();
     }
 }
开发者ID:yazeng,项目名称:WindowsProtocolTestSuites,代码行数:13,代码来源:RdpeiUtility.cs

示例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;
        }
开发者ID:OfficeDev,项目名称:Interop-TestSuites,代码行数:67,代码来源:TestSuiteHelper.cs


注:本文中的ITestSite.GetAdapter方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。