Microsoft.Protocols.TestSuites.Rdpbcgr.RdpbcgrTestSuite.S7_StaticVirtualChannel_PositiveTest_CompressionSupported C# (CSharp) Method

S7_StaticVirtualChannel_PositiveTest_CompressionSupported() private method

        public void S7_StaticVirtualChannel_PositiveTest_CompressionSupported()
        {
            #region Test Description
            /*
            1.	Trigger SUT to initiate and complete a RDP connection. In Capability Exchange phase, Test Suite sets the flags field to VCCAPS_COMPR_CS_8K (0x00000002) flag in Virtual Channel Capability Set.
            2.	After the connection sequence has been finished, Test Suite sends a Save Session Info PDU with a notification type of the INFOTYPE_LOGON (0x00000000), INFOTYPE_LOGON_LONG (0x00000001),
                or INFOTYPE_LOGON_PLAINNOTIFY (0x00000002) to notify the SUT that the user has logged on (how to determine the notification type is described in TD section 3.3.5.10) .
            3.	Trigger SUT to send some Static Virtual Channel PDUS.
            4.	Test Suite verifies the received Virtual Channel PDUs and expects these PDU are compressed.
            */
            #endregion

            #region Test Sequence
            this.TestSite.Assert.IsTrue(isClientSupportRDPEFS, "To execute test cases of S7, RDP client should support [MS-RDPEFS]: Remote Desktop Protocol: File System Virtual Channel Extension.");
            //Start RDP listening.
            this.TestSite.Log.Add(LogEntryKind.Comment, "Starting RDP listening.");
            this.rdpbcgrAdapter.StartRDPListening(transportProtocol);

            #region Trigger client to connect
            //Trigger client to connect.
            this.TestSite.Log.Add(LogEntryKind.Comment, "Triggering SUT to initiate a RDP connection to server.");
            triggerClientRDPConnect(transportProtocol);
            #endregion

            //Waiting for the transport level connection request.
            this.TestSite.Log.Add(LogEntryKind.Comment, "Expecting the transport layer connection request.");
            this.rdpbcgrAdapter.ExpectTransportConnection(RDPSessionType.Normal);

            this.TestSite.Log.Add(LogEntryKind.Comment, "Setting Server Capability. Virtual Channel compression is not supported.");
            this.rdpbcgrAdapter.SetServerCapability(true, true, true, true, true, true, true, true, true, true);

            //Waiting for the RDP connection sequence.
            this.TestSite.Log.Add(LogEntryKind.Comment, "Establishing RDP connection.");
            this.rdpbcgrAdapter.EstablishRDPConnection(selectedProtocol, enMethod, enLevel, true, false, rdpServerVersion);

            this.TestSite.Log.Add(LogEntryKind.Comment, "Sending Server Save Session Info PDU to SUT to notify user has logged on.");
            this.rdpbcgrAdapter.ServerSaveSessionInfo(LogonNotificationType.UserLoggedOn, ErrorNotificationType_Values.LOGON_FAILED_OTHER);

            //Check whether 'rdpdr' channel has been created
            if (this.rdpbcgrAdapter.GetStaticVirtualChannelId("RDPDR") == 0)
            {
                this.TestSite.Assume.Fail("The necessary channel RDPDR has not been created, so stop running this test case.");
            }

            this.TestSite.Log.Add(LogEntryKind.Comment, "Generating Static Virtual Channel traffics.");
            SendStaticVirtualChannelTraffics(StaticVirtualChannel_InvalidType.None);
            #endregion
        }
RdpbcgrTestSuite