added file logging to services.

This commit is contained in:
kay.one 2012-02-05 08:53:08 -08:00
parent ad9a7fa6e4
commit 1d1c62d376
12 changed files with 100 additions and 28 deletions

View file

@ -28,7 +28,7 @@ namespace NzbDrone.Common.Test
const string badTitle = "Bad Title";
ReportingService.ReportParseError(badTitle);
MockedRestProvider.Verify(p => p.PostData(It.Is<string>(c => c.ToLower().StartsWith("http://service.nzbdrone.com/")), It.Is<ParseErrorReport>(c => c.Title == badTitle)), Times.Once());
MockedRestProvider.Verify(p => p.PostData(It.Is<string>(c => c.ToLower().StartsWith("http://services.nzbdrone.com/")), It.Is<ParseErrorReport>(c => c.Title == badTitle)), Times.Once());
}
[Test]
@ -64,5 +64,14 @@ namespace NzbDrone.Common.Test
MockedRestProvider.Verify(p => p.PostData(It.IsAny<string>(), It.Is<ParseErrorReport>(c => c.Title == "title 2")), Times.Once());
}
[Test]
public void report_parse_error()
{
ReportingService.RestProvider = new RestProvider(new EnviromentProvider());
ReportingService.ReportParseError("Test error");
}
}
}