示例#1
0
        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));
        }
示例#2
0
        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));
        }
示例#3
0
        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() + "::"));
        }