public void text_text_reader() { Assert.Throws<ArgumentNullException>(() => ((TextReader) null).Text()); var text = Guid.NewGuid().ToString(); using (var reader = new StringReader(text)) { Assert.Equal(text, reader.Text()); Assert.Equal(-1, reader.Read()); } using (var reader = new StringReader(text)) { Assert.Equal(text, reader.Text(true)); Assert.Throws<ObjectDisposedException>(() => reader.Read()); } }