Esempio n. 1
0
        public void WriteToReproducesTheBodyOfTheStream()
        {
            StructuredStream stream = new StructuredStream("name")
            {
                Body = new BodyTag()
                {
                    Contents =
                    {
                        new TextTag("text")
                    }
                }
            };

            StructuredTextWriter writer = new StructuredTextWriter();

            stream.WriteTo(writer);
            writer.Close();

            Assert.AreEqual(stream.ToString(), writer.ToString());
        }
Esempio n. 2
0
        public void WriteToThrowsIfWriterIsNull()
        {
            StructuredStream stream = new StructuredStream("name");

            Assert.Throws <ArgumentNullException>(() => stream.WriteTo(null));
        }