public void TestReadDate() { Task server = Task.Run(() => { pipe.WaitForConnection(); Assert.Throws <NotImplementedException>(() => protocol.ReadDate()); }); Socket client = CreateClient(); server.Wait(); client.Disconnect(false); }
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(); }