public void BothWays() { Action <string> action = text => { var lines = TextLine.GetTextLines(text); var otherText = TextLine.CreateString(lines); Assert.AreEqual(text, otherText); }; action(""); action(Environment.NewLine); action("dog" + Environment.NewLine); action("dog" + Environment.NewLine + Environment.NewLine); action("dog" + Environment.NewLine + "cat" + Environment.NewLine); }
public void BothWays() { void action(string text) { var lines = TextLine.GetTextLines(text); var otherText = TextLine.CreateString(lines); Assert.Equal(text, otherText); } action(""); action(Environment.NewLine); action("dog" + Environment.NewLine); action("dog" + Environment.NewLine + Environment.NewLine); action("dog" + Environment.NewLine + "cat" + Environment.NewLine); }