Exemple #1
0
        public void PrintModeGeneralFailure()
        {
            logConfig.ExtraConfigs = new System.Collections.Generic.Dictionary <string, string>()
            {
                { "printMode", "General" }
            };

            var now       = DateTime.Now;
            var failedLog = logRegistry.AddFailedLog();

            logRegistry.AddValueToLog(failedLog, Common.LogAttribute.Timestamp, now);
            logRegistry.NotifyFailedLogParsed(failedLog);

            //@!"Problem printing log. Timestamp=^{Timestamp}, Message=^{Message}"[{Timestamp}] -- {Message}^{LogSource|, LogSource="{}"}^{ThreadID|, ThreadID="{}"}...^{Context|, Context="{}"}
            var expectedLogPrintout = $"Problem printing log. Timestamp={now}, Message=";

            var data = PrintData();

            Assert.That(data, Is.EqualTo(expectedLogPrintout));
        }