Esempio n. 1
0
        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);
        }
Esempio n. 2
0
        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);
        }