Fixed broken tests.

pull/4/head
kay.one 13 years ago
parent 19d45a5dc3
commit 0a3f5b24e4

@ -17,7 +17,6 @@ namespace NzbDrone.Services.Service.Controllers
{ {
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 @@ namespace NzbDrone.Services.Service.Controllers
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 } };
} }

@ -14,6 +14,10 @@ namespace NzbDrone.Services.Service.Exceptions
_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)
{ {

Loading…
Cancel
Save