コード例 #1
0
 public void ReadTestFileWithPlainLines()
 {
     using (var stream = TestLogFiles.OpenTestFileWithPlainLines())
     {
         var results = new SimpleLinePerLineReader(stream).ReadLines().ToList();
         results.Should().BeEquivalentTo(ExpectedResults);
     }
 }
コード例 #2
0
        public void ReadTestFileWithPlainLines()
        {
            var expectedResult = new List <ReadLogLineResult> {
                new ReadLogLineResult(0, null)
            };

            using (var stream = TestLogFiles.OpenTestFileWithPlainLines())
            {
                var results = new YamlConfigLogReader(stream).ReadLines().ToList();
                results.Should().BeEquivalentTo(expectedResult);
            }
        }
コード例 #3
0
        public void ReadTestFileWithPlainLines()
        {
            var expectedResults = new List <ReadLogLineResult>();

            for (var i = 1; i <= 6; ++i)
            {
                expectedResults.Add(new ReadLogLineResult(i, null));
            }

            var processingNotificationsCollector = new ProcessingNotificationsCollector(10);

            using (var stream = TestLogFiles.OpenTestFileWithPlainLines())
            {
                var reader  = new NativeJsonLogsReader(stream, "testFile.txt", processingNotificationsCollector);
                var results = reader.ReadLines().ToList();
                results.Should().BeEquivalentTo(expectedResults);
            }

            processingNotificationsCollector.TotalErrorsReported.Should().Be(6);
        }