예제 #1
0
        public void CountLines(string lines, int expectedResult)
        {
            // Arrange
            var stream = new MemoryStream(Encoding.UTF8.GetBytes(lines));

            stream.Seek(0L, SeekOrigin.Begin);

            // Act
            var lineCount = CsvUtil.CountLines(stream);

            // Assert
            Assert.Equal(expectedResult, lineCount);
        }