예제 #1
0
        StartProgressMonitor(string progressChannel, string title, string initialStatus)
        {
            string testBin             = cdir;
            string progressMonitorTool = Path.Combine(testBin, "Resources", "UnitTestProgressMonitor.exe");
            string requiredDll         = Path.Combine(testBin, "Resources", "Ionic.CopyData.dll");

            Assert.IsTrue(File.Exists(progressMonitorTool), "progress monitor tool does not exist ({0})", progressMonitorTool);
            Assert.IsTrue(File.Exists(requiredDll), "required DLL does not exist ({0})", requiredDll);

            // start the progress monitor
            string ignored;

            //this.Exec(progressMonitorTool, String.Format("-channel {0}", progressChannel), false);
            TestUtilities.Exec_NoContext(progressMonitorTool, String.Format("-channel {0}", progressChannel), false, out ignored);

            var txrx = new Ionic.CopyData.Transceiver();

            System.Threading.Thread.Sleep(1000);
            txrx.Channel = progressChannel;
            System.Threading.Thread.Sleep(450);
            txrx.Send("test " + title);
            System.Threading.Thread.Sleep(120);
            txrx.Send("status " + initialStatus);
            return(txrx);
        }
예제 #2
0
 void StartProgressClient(string progressChannel, string title, string initialStatus)
 {
     _txrx = new Ionic.CopyData.Transceiver();
     System.Threading.Thread.Sleep(1000);
     _txrx.Channel = progressChannel;
     System.Threading.Thread.Sleep(450);
     _txrx.Send("test " + title);
     System.Threading.Thread.Sleep(120);
     _txrx.Send("status " + initialStatus);
 }
예제 #3
0
 public void MyTestCleanupEx()
 {
     if (_txrx!=null)
     {
         try
         {
             _txrx.Send("stop");
             _txrx = null;
         }
         catch { }
     }
 }
예제 #4
0
        public void MyTestCleanup()
        {
            // The CWD of the monitoring process is the CurrentDir,
            // therefore this test must shut down the monitoring process
            // FIRST, to allow the deletion of the directory.
            if (_txrx != null)
            {
                try
                {
                    _txrx.Send("stop");
                    _txrx = null;
                }
                catch { }
            }

            TestUtilities.Cleanup(CurrentDir, _FilesToRemove);
        }
            StartProgressMonitor(string progressChannel, string title, string initialStatus)
        {
            string testBin = TestUtilities.GetTestBinDir(cdir);
            string progressMonitorTool = Path.Combine(testBin, "Resources\\UnitTestProgressMonitor.exe");
            string requiredDll = Path.Combine(testBin, "Resources\\Ionic.CopyData.dll");
            Assert.IsTrue(File.Exists(progressMonitorTool), "progress monitor tool does not exist ({0})",  progressMonitorTool);
            Assert.IsTrue(File.Exists(requiredDll), "required DLL does not exist ({0})",  requiredDll);

            // start the progress monitor
            string ignored;
            //this.Exec(progressMonitorTool, String.Format("-channel {0}", progressChannel), false);
            TestUtilities.Exec_NoContext(progressMonitorTool, String.Format("-channel {0}", progressChannel), false, out ignored);

            var txrx = new Ionic.CopyData.Transceiver();
            System.Threading.Thread.Sleep(1000);
            txrx.Channel = progressChannel;
            System.Threading.Thread.Sleep(450);
            txrx.Send("test " + title);
            System.Threading.Thread.Sleep(120);
            txrx.Send("status " + initialStatus);
            return txrx;
        }
예제 #6
0
        public static void SetupDebugConsole()
        {
            #if UseCopyData

            // use object initializer syntax
            System.Diagnostics.Process p3 = new System.Diagnostics.Process
                {
                    StartInfo =
                    {
                        FileName = "c:\\dinoch\\vsp\\UnitTestProgressMonitor\\UnitTestProgressMonitor\\bin\\Debug\\UnitTestProgressMonitor.exe",
                        Arguments = "-channel CscompShell",
                        CreateNoWindow = false,
                        UseShellExecute = false
                    }
                };
            p3.Start();

            // wait for the process to start?
            System.Threading.Thread.Sleep(650);

            transceiver = new Ionic.CopyData.Transceiver();
            transceiver.Channel = "CscompShell";

            transceiver.Send("title CSDE Shell Trace Monitor");

            System.Threading.Thread.Sleep(400);
            transceiver.Send("log Hello from CscompShell");
            #endif
        }