Exemplo n.º 1
0
        public void TerminateTest()
        {
            client = new IPCStringStream(id, buffer_size, false);
            server = new IPCStringStream(id, buffer_size, true);
            Thread t = new Thread(worker2);

            t.Start();
            Thread t2 = new Thread(terminator);

            t2.Start();
            string data;

            do
            {
                data = server.ReadLine();
                if (data != null)
                {
                    Console.WriteLine(data);
                }
                else
                {
                    break;
                }
            } while (true);
            t.Join();
            client.Dispose();
            server.Dispose();
        }
Exemplo n.º 2
0
        public void SmokeTest()
        {
            client = new IPCStringStream(id, buffer_size, false);
            server = new IPCStringStream(id, buffer_size, true);
            Thread t = new Thread(worker1);

            t.Start();
            Assert.AreEqual(server.ReadLine(), "hehe");
            t.Join();
            client.Dispose();
            server.Dispose();
        }