コード例 #1
0
        public void Ticket1232_1_1()
        {
            ThreadManager threadManager1 = new ThreadManager();
            ThreadManager threadManager2 = new ThreadManager();

            HliForm hliForm = new HliForm();

            EchoSCP echoSCP = new EchoSCP("SCP_Association");

            echoSCP.Initialize(threadManager1);

            Config.SetOptions(echoSCP, "Ticket1232_1_1", "SCP");
            echoSCP.Options.AutoValidate = false;

            hliForm.Attach(echoSCP);

            echoSCP.Start();

            System.Threading.Thread.Sleep(2000);

            for (int index = 0; index < 10; index++)
            {
                DicomThread_NUnit.EchoSCU echoSCU = new DicomThread_NUnit.EchoSCU();

                echoSCU.Initialize(threadManager2);

                Config.SetOptions(echoSCU, "Ticket1232_1_1", "SCU_" + index.ToString());
                echoSCU.Options.AutoValidate = false;

                hliForm.Attach(echoSCU);

                echoSCU.Start();

                System.Threading.Thread.Sleep(500);
            }

            threadManager2.WaitForCompletionThreads();

            echoSCP.Stop();
            echoSCP.WaitForCompletion();

            Assert.That(echoSCP.NrOfErrors + echoSCP.NrOfWarnings, Is.EqualTo(0));
        }
コード例 #2
0
        public void Ticket1232_1_1()
        {
            ThreadManager threadManager1 = new ThreadManager();
            ThreadManager threadManager2 = new ThreadManager();

            HliForm hliForm = new HliForm();

            EchoSCP echoSCP = new EchoSCP("SCP_Association");
            echoSCP.Initialize(threadManager1);

            Config.SetOptions(echoSCP, "Ticket1232_1_1", "SCP");
            echoSCP.Options.AutoValidate = false;

            hliForm.Attach(echoSCP);

            echoSCP.Start();

            System.Threading.Thread.Sleep(2000);

            for (int index = 0; index < 10; index++)
            {
                DicomThread_NUnit.EchoSCU echoSCU = new DicomThread_NUnit.EchoSCU();

                echoSCU.Initialize(threadManager2);

                Config.SetOptions(echoSCU, "Ticket1232_1_1", "SCU_" + index.ToString());
                echoSCU.Options.AutoValidate = false;

                hliForm.Attach(echoSCU);

                echoSCU.Start();

                System.Threading.Thread.Sleep(500);
            }

            threadManager2.WaitForCompletionThreads();

            echoSCP.Stop();
            echoSCP.WaitForCompletion();

            Assert.That(echoSCP.NrOfErrors + echoSCP.NrOfWarnings, Is.EqualTo(0));
        }