public void CreateWithFileInfoStandardFileName() { string fullLogFilename = logPath + logFile + ".log"; var logging = new EMLogging(logPath, logFile); Assert.IsNotNull(logging); logging.Log("Test"); Assert.IsTrue(File.Exists(fullLogFilename)); }
public void CreateWithAddedFileInfoDatedFileName() { string fullLogFilename = logPath + logFile + "." + logFileDate + ".log"; var logging = new EMLogging(); logging.DateStamp = true; logging.SetLoggingInfo(logPath, logFile); Assert.IsNotNull(logging); logging.Log("Test"); Assert.IsTrue(File.Exists(fullLogFilename)); }
public void CreateWithFileInfoAllLoggingTypes(LoggingType lt) { string fullLogFilename = logPath + logFile + ".log"; var logging = new EMLogging(logPath, logFile); Assert.IsNotNull(logging); logging.Log("Test", lt); Assert.IsTrue(File.Exists(fullLogFilename)); string line1 = File.ReadLines(fullLogFilename).First(); Assert.IsTrue(line1.Contains(lt.ToString() + "::")); }