|
|
|
@ -42,7 +42,10 @@ namespace NzbDrone.Core.Test
|
|
|
|
|
var logItem = db.Fetch<Log>().First();
|
|
|
|
|
Assert.AreNotEqual(new DateTime(), logItem.Time);
|
|
|
|
|
Assert.AreEqual(message, logItem.Message);
|
|
|
|
|
Assert.AreEqual(Logger.Name, logItem.Logger);
|
|
|
|
|
Assert.AreEqual("Core.Test.LogProviderTest", logItem.Logger);
|
|
|
|
|
|
|
|
|
|
Logger.Name.Should().EndWith(logItem.Logger);
|
|
|
|
|
|
|
|
|
|
Assert.AreEqual(LogLevel.Info.Name, logItem.Level);
|
|
|
|
|
Assert.AreEqual("write_log", logItem.Method);
|
|
|
|
|
}
|
|
|
|
@ -106,7 +109,7 @@ namespace NzbDrone.Core.Test
|
|
|
|
|
var logItem = db.Fetch<Log>().First();
|
|
|
|
|
Assert.AreNotEqual(new DateTime(), logItem.Time);
|
|
|
|
|
Assert.AreEqual(message + ": " + ex.Message, logItem.Message);
|
|
|
|
|
Assert.AreEqual(Logger.Name, logItem.Logger);
|
|
|
|
|
Assert.AreEqual("Core.Test.LogProviderTest", logItem.Logger);
|
|
|
|
|
Assert.AreEqual(LogLevel.Error.Name, logItem.Level);
|
|
|
|
|
Assert.AreEqual(ex.GetType().ToString(), logItem.ExceptionType);
|
|
|
|
|
Assert.AreEqual(ex.ToString(), logItem.Exception);
|
|
|
|
@ -140,7 +143,7 @@ namespace NzbDrone.Core.Test
|
|
|
|
|
var logItem = db.Fetch<Log>().First();
|
|
|
|
|
Assert.AreNotEqual(new DateTime(), logItem.Time);
|
|
|
|
|
Assert.AreEqual(ex.Message, logItem.Message);
|
|
|
|
|
Assert.AreEqual(Logger.Name, logItem.Logger);
|
|
|
|
|
Assert.AreEqual("Core.Test.LogProviderTest", logItem.Logger);
|
|
|
|
|
Assert.AreEqual(LogLevel.Error.Name, logItem.Level);
|
|
|
|
|
Assert.AreEqual(ex.GetType().ToString(), logItem.ExceptionType);
|
|
|
|
|
Assert.AreEqual(ex.ToString(), logItem.Exception);
|
|
|
|
|