public void DecreaseIndent_FromZero_Throws() { using (var writer = new StringWriter()) { var actualWriter = new IndentedTextWriter(writer, "aaa", 0); actualWriter.DecreaseIndent(); } }
public void Constructor_NegativeIndent_Throws() { using (var writer = new StringWriter()) { var actualWriter = new IndentedTextWriter(writer, "aaa", -1); actualWriter.DecreaseIndent(); } }
public void IncrementIndent_FromNonZero_IndentDecreases() { using (var writer = new StringWriter()) { var actualWriter = new IndentedTextWriter(writer, "aaa", 0); actualWriter.IncreaseIndent(); actualWriter.IncreaseIndent(); actualWriter.DecreaseIndent(); actualWriter.Write("Hello"); var actualText = writer.ToString(); Assert.AreEqual("aaaHello", actualText); } }