Esempio n. 1
0
        public void CanCreateMessageQueueUsingNNPrimitives()
        {
            var cancelSource = new CancellationTokenSource();

            Debug.WriteLine("Executing ReqRep test");

            var responseThread = new Thread(() => NNPrimitivesRequestReplyProcesses.Response(cancelSource.Token));

            responseThread.Start();
            NNPrimitivesRequestReplyProcesses.Request();
            cancelSource.Cancel();
        }
Esempio n. 2
0
        public void CanDoSuccessiveRequestReplies()
        {
            var cancelSource = new CancellationTokenSource();

            Debug.WriteLine("Executing ReqRep test");

            var responseThread = new Thread(() => NNPrimitivesRequestReplyProcesses.Response(cancelSource.Token));

            responseThread.Start();
            Assert.IsTrue(responseThread.IsAlive);
            NNPrimitivesRequestReplyProcesses.Request();
            Debug.WriteLine(String.Empty);
            Assert.IsTrue(responseThread.IsAlive);
            NNPrimitivesRequestReplyProcesses.Request();
            cancelSource.Cancel();
        }