Esempio n. 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);
        }
Esempio n. 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());
        }
Esempio n. 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));
        }