public void ChangingApplicationLogFilePathResultsInANewLogBeingCreated() { // Act var logManager = new LogManager(this.mockDateTimeStamper, this.applicationLogFilePath); logManager.WriteMessageToApplicationLog("Application log file."); logManager.Close(); logManager.ApplicationLogFilePath = this.alternativeApplicationLogFilePath; logManager.WriteMessageToApplicationLog("Alteranative application log file."); logManager.Close(); // Assert File.Exists(this.applicationLogFilePath).ShouldBeTrue(); File.Exists(this.alternativeApplicationLogFilePath).ShouldBeTrue(); }
private static void WriteMessagesToApplicationLog(LogManager logManager) { logManager.WriteMessageToApplicationLog(FirstLogMessage); logManager.WriteMessageToApplicationLog(SecondLogMessage); logManager.WriteMessageToApplicationLog(ThirdLogMessage); }