Example #1
0
        public void TestReadLinesCount()
        {
            var filename = "./Resources/Single1.CFG";

            using (var stream = new FileStream(filename, FileMode.Open, FileAccess.Read))
                Assert.Equal(73, ComtradeHelper.ReadLines(stream, Encoding.UTF8).ToList().Count);
        }
Example #2
0
        public void TestReadLinesEmpty()
        {
            var filename = "./Resources/EmptyFile.CFG";

            using (var stream = new FileStream(filename, FileMode.Open, FileAccess.Read))
                Assert.Empty(ComtradeHelper.ReadLines(stream, Encoding.UTF8).ToList());
        }
Example #3
0
        public void TestReadLinesNotNull()
        {
            var filename = "./Resources/Single1.CFG";

            using (var stream = new FileStream(filename, FileMode.Open, FileAccess.Read))
                Assert.NotNull(ComtradeHelper.ReadLines(stream, Encoding.UTF8));
        }