1
0
Fork 0
mirror of https://github.com/lidarr/Lidarr synced 2024-12-26 17:47:08 +00:00

Fixed broken tests.

This commit is contained in:
kay.one 2012-03-29 18:54:29 -07:00
parent 19d45a5dc3
commit 0a3f5b24e4
2 changed files with 15 additions and 12 deletions

View file

@ -17,7 +17,6 @@ public class ExceptionController : Controller
{ {
private readonly IDatabase _database; private readonly IDatabase _database;
private readonly ExceptionRepository _exceptionRepository; private readonly ExceptionRepository _exceptionRepository;
private readonly MongoDatabase _mongoDatabase;
private static readonly Logger logger = LogManager.GetCurrentClassLogger(); private static readonly Logger logger = LogManager.GetCurrentClassLogger();
[Inject] [Inject]
@ -76,20 +75,20 @@ public JsonResult ReportNew(ExceptionReport exceptionReport)
report.Stack = exceptionReport.Stack; report.Stack = exceptionReport.Stack;
report.Uid = exceptionReport.UGuid.ToString(); report.Uid = exceptionReport.UGuid.ToString();
var exceptionHash = _exceptionRepository.Store(report); _exceptionRepository.Store(report);
//var exceptionHash = GetExceptionDetailId(exceptionReport); var exceptionHash = GetExceptionDetailId(exceptionReport);
//var exceptionInstance = new ExceptionInstance var exceptionInstance = new ExceptionInstance
// { {
// ExceptionHash = exceptionHash, ExceptionHash = exceptionHash,
// IsProduction = exceptionReport.IsProduction, IsProduction = exceptionReport.IsProduction,
// LogMessage = exceptionReport.LogMessage, LogMessage = exceptionReport.LogMessage,
// Timestamp = DateTime.Now, Timestamp = DateTime.Now,
// UGuid = exceptionReport.UGuid UGuid = exceptionReport.UGuid
// }; };
//_database.Insert(exceptionInstance); _database.Insert(exceptionInstance);
return new JsonResult { Data = new ExceptionReportResponse { ExceptionHash = exceptionHash } }; return new JsonResult { Data = new ExceptionReportResponse { ExceptionHash = exceptionHash } };
} }

View file

@ -14,6 +14,10 @@ public ExceptionRepository(MongoDatabase mongoDb)
_mongoDb = mongoDb; _mongoDb = mongoDb;
} }
public ExceptionRepository()
{
}
public virtual string Store(NzbDrone.Services.Service.Exceptions.ExceptionReport exceptionReport) public virtual string Store(NzbDrone.Services.Service.Exceptions.ExceptionReport exceptionReport)
{ {