public async Task Indent_WriteIndentation_Unindent_WriteIndentAsync() { // arrange var stringBuilder = new StringBuilder(); var writer = new DocumentWriter(stringBuilder); // act writer.Indent(); await writer.WriteIndentationAsync(); await writer.WriteLineAsync(); writer.Unindent(); await writer.WriteIndentationAsync(); // assert Assert.Equal( " " + writer.NewLine + string.Empty, stringBuilder.ToString()); }
public async Task WriteIndentationAsync() { // arrange var stringBuilder = new StringBuilder(); var writer = new DocumentWriter(stringBuilder); // act await writer.WriteIndentationAsync(); // assert Assert.Equal(string.Empty, stringBuilder.ToString()); }