示例#1
0
        // getTime should return time in expected format from given numeric date in given logLine.
        public void getTime_success()
        {
            ProcessLogcontent processLogcontent = new ProcessLogcontent();
            string            logLine           = "05/22 01:02:33 error :...this is first log";
            var expected_time = processLogcontent.getTime(logLine);

            Assert.Equal("1:02 AM", expected_time);
        }
示例#2
0
        // getTime should return default time "12:00 AM "in when not date string is available in given logLine.
        public void getTime_failure()
        {
            ProcessLogcontent processLogcontent = new ProcessLogcontent();
            string            logLine           = "05/22 01/02/33 error :...this is first log";
            var expected_time = processLogcontent.getTime(logLine);

            Assert.Equal("12:00 AM", expected_time);
        }