protected override void TestInitialize()
        {
            // Verify RDP version
            string     testName = this.TestContext.TestName;
            MethodInfo method   = GetType().GetMethod(testName);

            Attribute[] attrs      = Attribute.GetCustomAttributes(method);
            string      rdpVersion = GetSupportedRDPVersion(attrs);

            VerifyRDPVersion(testName, rdpVersion);

            this.rdpbcgrAdapter    = (IRdpbcgrAdapter)this.TestSite.GetAdapter(typeof(IRdpbcgrAdapter));
            this.sutControlAdapter = (IRdpSutControlAdapter)this.TestSite.GetAdapter(typeof(IRdpSutControlAdapter));
            this.rdpbcgrAdapter.Reset();
            LoadConfig();

            this.rdpbcgrAdapter.ConfirmActiveRequest += new ConfirmActiveRequestHandler(this.testClassBase_getConfirmActivePduInfo);

            if (isWindowsImplementation)
            {
                string RDPClientVersion = this.Site.Properties["RDP.Version"].ToString();
                if (string.CompareOrdinal(RDPClientVersion, "10.3") == 0) // Windows client will not interrupt the connection for RDPClient 10.3.
                {
                    DropConnectionForInvalidRequest = true;               //A switch to avoid waiting till timeout.
                }
                else
                {
                    DropConnectionForInvalidRequest = false; //A switch to avoid waiting till timeout.
                }
            }
        }
        protected override void TestInitialize()
        {
            // Verify RDP version
            string     testName = this.TestContext.TestName;
            MethodInfo method   = GetType().GetMethod(testName);

            Attribute[] attrs      = Attribute.GetCustomAttributes(method);
            string      rdpVersion = GetSupportedRDPVersion(attrs);

            VerifyRDPVersion(testName, rdpVersion);

            this.rdpbcgrAdapter    = (IRdpbcgrAdapter)this.TestSite.GetAdapter(typeof(IRdpbcgrAdapter));
            this.sutControlAdapter = (IRdpSutControlAdapter)this.TestSite.GetAdapter(typeof(IRdpSutControlAdapter));
            this.rdpbcgrAdapter.Reset();
            LoadConfig();

            this.rdpbcgrAdapter.ConfirmActiveRequest += new ConfirmActiveRequestHandler(this.testClassBase_getConfirmActivePduInfo);
        }
Exemplo n.º 3
0
        protected override void TestInitialize()
        {
            // Verify RDP version
            string     testName = this.TestContext.TestName;
            MethodInfo method   = GetType().GetMethod(testName);

            Attribute[] attrs      = Attribute.GetCustomAttributes(method);
            string      rdpVersion = GetSupportedRDPVersion(attrs);

            VerifyRDPVersion(testName, rdpVersion);

            this.rdpbcgrAdapter    = this.TestSite.GetAdapter <IRdpbcgrAdapter>();
            this.sutControlAdapter = this.TestSite.GetAdapter <IRdpSutControlAdapter>();
            this.rdpbcgrAdapter.Reset();
            LoadConfig();

            this.rdpbcgrAdapter.ConfirmActiveRequest += new ConfirmActiveRequestHandler(this.testClassBase_getConfirmActivePduInfo);

            if (isWindowsImplementation)
            {
                string RDPClientVersion;
                PtfPropUtility.GetPtfPropertyValue(Site, "Version", out RDPClientVersion);

                if (string.CompareOrdinal(RDPClientVersion, "10.3") == 0) // Windows client will not interrupt the connection for RDPClient 10.3.
                {
                    DropConnectionForInvalidRequest = true;               //A switch to avoid waiting till timeout.
                }
                else
                {
                    DropConnectionForInvalidRequest = false; //A switch to avoid waiting till timeout.
                }
            }

            var result = this.sutControlAdapter.SetCompressionValue(supportCompression);

            if (result < 0)
            {
                TestSite.Assume.Inconclusive("The compression value didn't set propery as supportCompression");
            }

            CheckPlatformCompatibility();
        }
        protected override void TestInitialize()
        {
            // Verify RDP version
            string testName = this.TestContext.TestName;
            MethodInfo method = GetType().GetMethod(testName);
            Attribute[] attrs = Attribute.GetCustomAttributes(method);
            string rdpVersion = GetSupportedRDPVersion(attrs);
            VerifyRDPVersion(testName, rdpVersion);

            this.rdpbcgrAdapter = (IRdpbcgrAdapter)this.TestSite.GetAdapter(typeof(IRdpbcgrAdapter));
            this.sutControlAdapter = (IRdpSutControlAdapter)this.TestSite.GetAdapter(typeof(IRdpSutControlAdapter));
            this.rdpbcgrAdapter.Reset();
            LoadConfig();

            this.rdpbcgrAdapter.ConfirmActiveRequest += new ConfirmActiveRequestHandler(this.testClassBase_getConfirmActivePduInfo);
        }