Example #1
0
        public void TestParseFile()
        {
            var entries = _accessLogParser.ParseLogs(LogFileFixture.ReadLogs());

            entries.Should()
            .BeEquivalentTo(LogFileFixture.GetAccessEntries());
        }
Example #2
0
        public void TestGetLogsFromStartIndex()
        {
            var logs = _accessLog.GetLogs(2);

            logs.Should()
            .BeEquivalentTo(LogFileFixture.ReadLogsTrimmed());
        }
Example #3
0
        public void TestGetLogs()
        {
            var logs = _accessLog.GetLogs();

            logs.Should()
            .BeEquivalentTo(LogFileFixture.ReadLogs());
        }
Example #4
0
 private void ExpectLogsUsingStartIndex()
 {
     _accessLogMock.Setup(accessLog => accessLog.GetLogs(It.IsAny <long>()))
     .Returns(LogFileFixture.ReadLogsTrimmed());
 }
Example #5
0
        // --------------------------------------------------------------------------------------------------

        private void ExpectFullLogs()
        {
            _accessLogMock.Setup(accessLog => accessLog.GetLogs())
            .Returns(LogFileFixture.ReadLogs());
        }
Example #6
0
 public void TearDown()
 {
     LogFileFixture.DeleteTempLogs(_logsFile);
 }
Example #7
0
 public void SetUp()
 {
     _logsFile  = LogFileFixture.WriteLogs();
     _accessLog = new AccessLogFile(CreateLogger <AccessLogFile>(), _logsFile);
 }