Added some update APIs to check for updates and download and extract the update package.

Todo: apply updated, UI.
This commit is contained in:
kay.one
2011-10-20 22:04:26 -07:00
parent e5c4f34e0e
commit 8f9946eb63
31 changed files with 18597 additions and 95 deletions
+2 -1
View File
@@ -4,6 +4,7 @@ using NLog;
using NLog.Config;
using NUnit.Framework;
using NzbDrone.Core;
using NzbDrone.Core.Providers;
using NzbDrone.Core.Test.Framework;
[SetUpFixture]
@@ -20,7 +21,7 @@ public class Fixtures
{
try
{
LogManager.Configuration = new XmlLoggingConfiguration(Path.Combine(CentralDispatch.AppPath, "log.config"), false);
LogManager.Configuration = new XmlLoggingConfiguration(Path.Combine(new EnviromentProvider().AppPath, "log.config"), false);
LogManager.ThrowExceptions = true;
var exceptionVerification = new ExceptionVerification();
+21 -3
View File
@@ -1,4 +1,5 @@
using NUnit.Framework;
using System.IO;
using NUnit.Framework;
using NzbDrone.Core.Providers.Jobs;
namespace NzbDrone.Core.Test.Framework
@@ -11,8 +12,10 @@ namespace NzbDrone.Core.Test.Framework
public void Setup()
{
ExceptionVerification.Reset();
if (Directory.Exists(TempFolder))
{
Directory.Delete(TempFolder, true);
}
}
[TearDown]
@@ -22,5 +25,20 @@ namespace NzbDrone.Core.Test.Framework
ExceptionVerification.AssertNoUnexcpectedLogs();
}
protected string TempFolder
{
get { return Path.Combine(Directory.GetCurrentDirectory(), "_temp"); }
}
protected string GetTestFilePath(string fileName)
{
return Path.Combine(@".\Files\", fileName);
}
protected string ReadTestFile(string fileName)
{
return File.ReadAllText(GetTestFilePath(fileName));
}
}
}