Esempio n. 1
0
 protected virtual void OnTestSuccess(ProtocolUnitTestEventArgs args)
 {
     TestEventHandler handler = TestSuccess;
     if (handler != null) {
         handler(this, args);
     }
 }
Esempio n. 2
0
 protected void Test_TestSetup(ProtocolUnitTest sender, ProtocolUnitTestEventArgs args)
 {
     this.NetworkConsoleModel.Connection.ClientEvent += new Action<IClientEventArgs>(Connection_ClientEvent);
 }
Esempio n. 3
0
        protected void ProtocolTestRun_TestSuccess(ProtocolTestRun sender, ProtocolUnitTestEventArgs e)
        {
            if (this.InvokeRequired == true) {
                this.Invoke(new Action<ProtocolTestRun, ProtocolUnitTestEventArgs>(this.ProtocolTestRun_TestSuccess), sender, e);
                return;
            }

            this.OutputTestResult(e.Test);

            this.ConsoleAppendLine("END: [^2SUCCESS^0]");
        }
Esempio n. 4
0
        protected void Test_TestEvent(ProtocolUnitTest sender, ProtocolUnitTestEventArgs e)
        {
            if (this.InvokeRequired == true) {
                this.Invoke(new Action<ProtocolUnitTest, ProtocolUnitTestEventArgs>(this.Test_TestEvent), sender, e);
                return;
            }

            if (String.IsNullOrEmpty(e.Message) == false) {
                this.ConsoleAppendLine("{0}", e.Message);
            }
        }
Esempio n. 5
0
        protected void ProtocolTestRun_TestBegin(ProtocolTestRun sender, ProtocolUnitTestEventArgs e)
        {
            if (this.InvokeRequired == true) {
                this.Invoke(new Action<ProtocolTestRun, ProtocolUnitTestEventArgs>(this.ProtocolTestRun_TestBegin), sender, e);
                return;
            }

            this.ConsoleAppendLine("===========================================================================================");
            this.ConsoleAppendLine("BEGIN: {0}", e.Test.Name);

            e.Test.TestEvent += new ProtocolUnitTest.TestEventHandler(Test_TestEvent);
            e.Test.TestSetup += new ProtocolUnitTest.TestEventHandler(Test_TestSetup);
        }