Beispiel #1
0
        public void TestGetLogs()
        {
            var logs = _accessLog.GetLogs();

            logs.Should()
            .BeEquivalentTo(LogFileFixture.ReadLogs());
        }
        // ------------------------------------------------------------------------------------------------

        private IEnumerable <string> GetLogs(long linesProcessed)
        {
            long processedLogs = 0;
            IEnumerable <string> textLogs;

            if (linesProcessed == 0)
            {
                textLogs      = _accessLog.GetLogs();
                processedLogs = textLogs.Count();
            }
            else
            {
                textLogs      = _accessLog.GetLogs(linesProcessed);
                processedLogs = linesProcessed + textLogs.Count();
            }

            SaveProcessedLog(processedLogs);

            return(textLogs);
        }