Exemplo n.º 1
0
        public void TestReadDate()
        {
            Task server = Task.Run(() =>
            {
                pipe.WaitForConnection();
                Assert.Throws <NotImplementedException>(() => protocol.ReadDate());
            });
            Socket client = CreateClient();

            server.Wait();
            client.Disconnect(false);
        }
Exemplo n.º 2
0
        public void TestReadDate()
        {
            DateTime target = new DateTime(2022, 3, 17);
            Task     server = Task.Run(() =>
            {
                pipe.WaitForConnection();
                Assert.AreEqual(target, protocol.ReadDate());
            });

            using (Stream client = CreateClient())
            {
                PipeUtilities.SendDateToPipe(client, target);
            }

            server.Wait();
        }