コード例 #1
0
        protected override void TestCleanup()
        {
            base.TestCleanup();

            //Reset the client status to avoid dirty data for the next test case.
            this.clientUUdpVer = null;
            this.clientRdpudpVerfionInfoValidFlag = null;

            this.TestSite.Log.Add(LogEntryKind.Comment, "Trigger client to close all RDP connections for clean up.");
            int iResult = this.sutControlAdapter.TriggerClientDisconnectAll(this.TestContext.TestName);
            this.TestSite.Log.Add(LogEntryKind.Debug, "The result of TriggerClientDisconnectAll is {0}.", iResult);

            if (rdpemtServerL != null)
                rdpemtServerL.Dispose();

            if (rdpemtServerR != null)
                rdpemtServerR.Dispose();
            if (rdpeudpServer != null && rdpeudpServer.Running)
                rdpeudpServer.Stop();
            if (rdpeudpSocketR != null && rdpeudpSocketR.Connected)
                rdpeudpSocketR.Close();
            if (rdpeudpSocketL != null && rdpeudpSocketL.Connected)
                rdpeudpSocketL.Close();

            this.TestSite.Log.Add(LogEntryKind.Comment, "Stop RDP listening.");
            this.rdpbcgrAdapter.StopRDPListening();
        }
コード例 #2
0
        protected override void TestCleanup()
        {
            base.TestCleanup();

            //Reset the client status to avoid dirty data for the next test case.
            this.clientUUdpVer = null;
            this.clientRdpudpVerfionInfoValidFlag = null;

            this.TestSite.Log.Add(LogEntryKind.Comment, "Trigger client to close all RDP connections for clean up.");

            TriggerClientDisconnectAll();

            if (rdpemtServerL != null)
            {
                rdpemtServerL.Dispose();
            }

            if (rdpemtServerR != null)
            {
                rdpemtServerR.Dispose();
            }
            if (rdpeudpServer != null)
            {
                rdpeudpServer.Stop();
            }
            if (rdpeudpSocketR != null && rdpeudpSocketR.Connected)
            {
                rdpeudpSocketR.Close();
            }
            if (rdpeudpSocketL != null && rdpeudpSocketL.Connected)
            {
                rdpeudpSocketL.Close();
            }

            this.TestSite.Log.Add(LogEntryKind.Comment, "Stop RDP listening.");
            this.rdpbcgrAdapter?.StopRDPListening();
        }