|
|
@ -15,8 +15,6 @@ namespace NzbDrone.Core.Test.InstrumentationTests
|
|
|
|
[TestFixture]
|
|
|
|
[TestFixture]
|
|
|
|
public class DatabaseTargetFixture : DbTest<DatabaseTarget, Log>
|
|
|
|
public class DatabaseTargetFixture : DbTest<DatabaseTarget, Log>
|
|
|
|
{
|
|
|
|
{
|
|
|
|
string _loggerName;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private static string _uniqueMessage;
|
|
|
|
private static string _uniqueMessage;
|
|
|
|
Logger _logger;
|
|
|
|
Logger _logger;
|
|
|
|
|
|
|
|
|
|
|
@ -119,7 +117,7 @@ namespace NzbDrone.Core.Test.InstrumentationTests
|
|
|
|
private void VerifyLog(Log logItem, LogLevel level)
|
|
|
|
private void VerifyLog(Log logItem, LogLevel level)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
logItem.Time.Should().BeWithin(TimeSpan.FromSeconds(2));
|
|
|
|
logItem.Time.Should().BeWithin(TimeSpan.FromSeconds(2));
|
|
|
|
logItem.Logger.Should().Be(_loggerName);
|
|
|
|
logItem.Logger.Should().Be(this.GetType().Name);
|
|
|
|
logItem.Level.Should().Be(level.Name);
|
|
|
|
logItem.Level.Should().Be(level.Name);
|
|
|
|
logItem.Method.Should().Be(new StackTrace().GetFrame(1).GetMethod().Name);
|
|
|
|
logItem.Method.Should().Be(new StackTrace().GetFrame(1).GetMethod().Name);
|
|
|
|
_logger.Name.Should().EndWith(logItem.Logger);
|
|
|
|
_logger.Name.Should().EndWith(logItem.Logger);
|
|
|
|