protected virtual SourceText CreateSourceText(INotation notation) { var sb = new StringBuilder(); notation.Record(sb); return(SourceText.From(sb.ToString(), Encoding.UTF8)); }
public void CombineWhenListEmpty() { var result = new INotation[0].Combine(); Assert.IsType <ActionNotation>(result); var sb = new StringBuilder(); result.Record(sb); Assert.Empty(sb.ToString()); }
public void CombineWhenListNotEmpty() { var result = new INotation[] { "a".ToNotation(), "b".ToNotation() }.Combine(); Assert.NotSame(ConstNotations.Nothing, result); var sb = new StringBuilder(); result.Record(sb); Assert.Equal("ab", sb.ToString()); }