DecreaseIndentation() 공개 메소드

public DecreaseIndentation ( ) : void
리턴 void
예제 #1
0
        public void DecreasingIndentation_ByMustBeGreaterThanZero()
        {
            var sw = new StringWriter();
            var iw = new IndentingTextWriter(sw, "  ");

            Assert.Throws <ArgumentOutOfRangeException>(() => iw.DecreaseIndentation(0));
            Assert.Throws <ArgumentOutOfRangeException>(() => iw.DecreaseIndentation(-42));
        }
예제 #2
0
        public void DecreasingIndentation_NeverDropsBelowZero()
        {
            var sw = new StringWriter();
            var iw = new IndentingTextWriter(sw, "  ");

            iw.DecreaseIndentation();
            iw.DecreaseIndentation();
            Assert.AreEqual(0, iw.Indentation);
        }
        public void DecreasingIndentation_ByMustBeGreaterThanZero()
        {
            var sw = new StringWriter();
            var iw = new IndentingTextWriter(sw, "  ");

            Assert.Throws<ArgumentOutOfRangeException>(() => iw.DecreaseIndentation(0));
            Assert.Throws<ArgumentOutOfRangeException>(() => iw.DecreaseIndentation(-42));
        }
        public void DecreasingIndentation_NeverDropsBelowZero()
        {
            var sw = new StringWriter();
            var iw = new IndentingTextWriter(sw, "  ");

            iw.DecreaseIndentation();
            iw.DecreaseIndentation();
            Assert.AreEqual(0, iw.Indentation);
        }