public void FromTextReader_StringReader()
        {
            const string inputString = "Hello world!";

            using (var stringReader = new StringReader(inputString))
                using (var stream = StreamUtils.FromTextReader(stringReader))
                {
                    Assert.AreEqual(typeof(LatticeUtils.Streams.TextReaderStream), stream.GetType());
                    Assert.AreEqual(inputString, Encoding.UTF8.GetString(StreamUtils.ReadAllBytes(stream)));
                }
        }
        public void FromTextReader_StreamReader()
        {
            const string inputString = "Hello world!";

            using (var memoryStream = new MemoryStream(Encoding.UTF8.GetBytes(inputString)))
                using (var streamReader = new StreamReader(memoryStream, Encoding.UTF8))
                    using (var stream = StreamUtils.FromTextReader(streamReader))
                    {
                        Assert.AreEqual(typeof(MemoryStream), stream.GetType());
                        Assert.AreSame(memoryStream, stream);
                        Assert.AreEqual(inputString, Encoding.UTF8.GetString(StreamUtils.ReadAllBytes(stream)));
                    }
        }