Ejemplo n.º 1
0
        public void ChangingJobLogFilePathResultsInANewLogBeingCreated()
        {
            // Act
              var logManager = new LogManager(this.mockDateTimeStamper, this.applicationLogFilePath);
              logManager.JobLogFilePath = this.jobLogFilePath;
              logManager.WriteMessageToJobLog("Job log file.");
              logManager.Close();

              logManager.JobLogFilePath = this.alternativeJobLogFilePath;
              logManager.WriteMessageToJobLog("Alternative job log file.");
              logManager.Close();

              // Assert
              File.Exists(this.jobLogFilePath).ShouldBeTrue();
              File.Exists(this.alternativeJobLogFilePath).ShouldBeTrue();
        }
Ejemplo n.º 2
0
 private static void WriteMessagesToJobLog(LogManager logManager)
 {
     logManager.WriteMessageToJobLog(FirstLogMessage);
       logManager.WriteMessageToJobLog(SecondLogMessage);
       logManager.WriteMessageToJobLog(ThirdLogMessage);
 }