public void reader_throws_if_unable_to_connect_to_endpoint() { Assert.Throws<IOException>(() => { using(var reader = new ProxyMessageReader(TestEndpoint)) { reader.Read(); } }); }
public void reader_reads_messages_sent_from_endpoint_until_a_null_mesage_is_read() { using(var server = new Server()) using(var reader = new ProxyMessageReader(TestEndpoint)) { foreach(var expected in Server.Messages) { Assert.MessagesAreEqual(expected, reader.Read()); } Assert.Null(reader.Read()); } }