Basic indexer tests are working

This commit is contained in:
kay.one
2011-05-19 21:18:51 -07:00
parent 9c1ff4af6b
commit 3e1ff7e96e
4 changed files with 63 additions and 78 deletions

View File

@@ -69,6 +69,16 @@ namespace NzbDrone.Core.Test.Framework
Excpected(LogLevel.Warn, count);
}
internal static void IgnoreWarns()
{
Ignore(LogLevel.Warn);
}
internal static void IgnoreErrors()
{
Ignore(LogLevel.Error);
}
private static void Excpected(LogLevel level, int count)
{
var levelLogs = _logs.Where(l => l.Level == level).ToList();
@@ -83,5 +93,11 @@ namespace NzbDrone.Core.Test.Framework
levelLogs.ForEach(c => _logs.Remove(c));
}
private static void Ignore(LogLevel level)
{
var levelLogs = _logs.Where(l => l.Level == level).ToList();
levelLogs.ForEach(c => _logs.Remove(c));
}
}
}