public void Character() { string result = null; using (var writer = TextIndenter.Open((char r) => result += r)) writer.Write("1337").Wait(); Assert.Equal("1337", result); }
public void String(string expect, string[] append) { string result = null; using (var indenter = TextIndenter.Open(r => result = r)) foreach (var a in append) { indenter.Write(a.GetEnumerator()); } Assert.Equal(expect, result); }
public void Task(string expect, string[] append) { var result = TextIndenter.Open(); foreach (var a in append) { result.Item1.Write(a.GetEnumerator()); } result.Item1.Close(); Assert.Equal(expect, result.Item2.WaitFor()); }