public void Builder_AppendsLine_BasedOnItsIdentation() { var baseIdentation = new BuilderState(new TypeInformation()); baseIdentation.AppendLine("hello"); var sut = baseIdentation.IncrementIdentation(); sut.AppendLine("world"); baseIdentation.AppendLine("!"); Assert.Equal($"hello{Environment.NewLine} world{Environment.NewLine}!{Environment.NewLine}", sut.Builder.ToString()); }
public void DoubleIncrement_Adds_DoubleIdentation() { var sut = new BuilderState(new TypeInformation()).IncrementIdentation().IncrementIdentation(); sut.AppendLine("hello"); Assert.Equal($" hello{Environment.NewLine}", sut.Builder.ToString()); }
public void AppendLineWithText_Adds_Text() { var sut = new BuilderState(new TypeInformation()); sut.AppendLine("hello"); Assert.Equal($"hello{Environment.NewLine}", sut.Builder.ToString()); }
public void AppendLine_Adds_EmptyLine() { var sut = new BuilderState(new TypeInformation()); sut.AppendLine(); Assert.Equal(Environment.NewLine, sut.Builder.ToString()); }