Beispiel #1
0
        public void TestCountLineBreaksTwoLines()
        {
            string line = "line1\n" +
                          "line2";

            Assert.AreEqual(1, CStringUtils.LinesBreaksCount(line));
        }
Beispiel #2
0
        public void TestCountLineBreaksThreeLines()
        {
            string line = "line1\n" +
                          "line2\n" +
                          "line3";

            Assert.AreEqual(2, CStringUtils.LinesBreaksCount(line));
        }
Beispiel #3
0
        public void TestCountLineBreaksNullLine()
        {
            string line = null;

            Assert.AreEqual(0, CStringUtils.LinesBreaksCount(line));
        }
Beispiel #4
0
        public void TestCountLineBreaksSingleLine()
        {
            string line = "line";

            Assert.AreEqual(0, CStringUtils.LinesBreaksCount(line));
        }