diff --git a/NzbDrone.App.Test/EnviromentControllerTest.cs b/NzbDrone.App.Test/EnviromentProviderTest.cs similarity index 94% rename from NzbDrone.App.Test/EnviromentControllerTest.cs rename to NzbDrone.App.Test/EnviromentProviderTest.cs index ac0d82077..f2615bf76 100644 --- a/NzbDrone.App.Test/EnviromentControllerTest.cs +++ b/NzbDrone.App.Test/EnviromentProviderTest.cs @@ -9,7 +9,7 @@ using NzbDrone.Providers; namespace NzbDrone.App.Test { [TestFixture] - public class EnviromentControllerTest + public class EnviromentProviderTest { [Test] diff --git a/NzbDrone.App.Test/ApplicationTest.cs b/NzbDrone.App.Test/MonitoringProviderTest.cs similarity index 100% rename from NzbDrone.App.Test/ApplicationTest.cs rename to NzbDrone.App.Test/MonitoringProviderTest.cs diff --git a/NzbDrone.App.Test/NzbDrone.App.Test.csproj b/NzbDrone.App.Test/NzbDrone.App.Test.csproj index 11b201b71..93f582cfa 100644 --- a/NzbDrone.App.Test/NzbDrone.App.Test.csproj +++ b/NzbDrone.App.Test/NzbDrone.App.Test.csproj @@ -72,11 +72,11 @@ - + - + diff --git a/NzbDrone.App.Test/ProcessProviderTests.cs b/NzbDrone.App.Test/ProcessProviderTests.cs index 9c9d166b5..35aea670c 100644 --- a/NzbDrone.App.Test/ProcessProviderTests.cs +++ b/NzbDrone.App.Test/ProcessProviderTests.cs @@ -43,6 +43,14 @@ namespace NzbDrone.App.Test dummyProcess.HasExited.Should().BeTrue(); } + [TestCase(0)] + [TestCase(-1)] + [TestCase(9999)] + public void GetProcessById_should_return_null_for_invalid_process(int processId) + { + _processProvider.GetProcessById(processId).Should().BeNull(); + } + public Process StartDummyProcess() { diff --git a/NzbDrone.Core/Properties/AssemblyInfo.cs b/NzbDrone.Core/Properties/AssemblyInfo.cs index 77251d559..62545d84a 100644 --- a/NzbDrone.Core/Properties/AssemblyInfo.cs +++ b/NzbDrone.Core/Properties/AssemblyInfo.cs @@ -50,5 +50,5 @@ using System.Runtime.InteropServices; // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.5.0.*")] +[assembly: AssemblyVersion("0.6.0.*")] [assembly: InternalsVisibleTo("NzbDrone.Core.Test")] \ No newline at end of file diff --git a/NzbDrone.Web/Properties/AssemblyInfo.cs b/NzbDrone.Web/Properties/AssemblyInfo.cs index 752fec6d1..24001ff67 100644 --- a/NzbDrone.Web/Properties/AssemblyInfo.cs +++ b/NzbDrone.Web/Properties/AssemblyInfo.cs @@ -34,4 +34,4 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("0.5.0.*")] \ No newline at end of file +[assembly: AssemblyVersion("0.6.0.*")] \ No newline at end of file diff --git a/NzbDrone/Program.cs b/NzbDrone/Program.cs index 5c391cd5a..acd830e37 100644 --- a/NzbDrone/Program.cs +++ b/NzbDrone/Program.cs @@ -1,4 +1,5 @@ using System; +using System.Reflection; using NLog; using Ninject; using NzbDrone.Providers; @@ -25,7 +26,7 @@ namespace NzbDrone Kernel.Bind().ToSelf().InSingletonScope(); Kernel.Bind().ToSelf().InSingletonScope(); - Console.WriteLine("Starting Console."); + Console.WriteLine("Starting NzbDrone Console. Version " + Assembly.GetExecutingAssembly().GetName().Version); Kernel.Get().Start(); Kernel.Get().Start(); } diff --git a/NzbDrone/Properties/AssemblyInfo.cs b/NzbDrone/Properties/AssemblyInfo.cs index c1e66ade6..0fb14c3d9 100644 --- a/NzbDrone/Properties/AssemblyInfo.cs +++ b/NzbDrone/Properties/AssemblyInfo.cs @@ -36,4 +36,4 @@ using System.Runtime.InteropServices; // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.5.0.*")] \ No newline at end of file +[assembly: AssemblyVersion("0.6.0.*")] \ No newline at end of file diff --git a/NzbDrone/Providers/ProcessProvider.cs b/NzbDrone/Providers/ProcessProvider.cs index 9b7855673..fd12e3e68 100644 --- a/NzbDrone/Providers/ProcessProvider.cs +++ b/NzbDrone/Providers/ProcessProvider.cs @@ -73,7 +73,7 @@ namespace NzbDrone.Providers private static ProcessInfo ConvertToProcessInfo(Process process) { - if (process == null) return null; + if (process == null || process.Id <= 0) return null; return new ProcessInfo {