Пример #1
0
        public void TestGenericIndentedFluentAPI()
        {
            // This is the old style. Please prefer using Fluent API
            _w.WriteLine("Line1");
            using (_w.WithIndent())
            {
                _w.WriteLine("Line2");
                using (_w.WithIndent())
                {
                    _w.WriteLine("Line3");
                }
                _w.WriteLine("Line4");
            }

            Assert.AreEqual(expectedGeneric, _w.GetContents());
        }