More bugfixes, tests.

This commit is contained in:
kay.one 2011-10-07 22:06:16 -07:00
commit be651660a4
9 changed files with 17 additions and 8 deletions

View file

@ -9,7 +9,7 @@ using NzbDrone.Providers;
namespace NzbDrone.App.Test
{
[TestFixture]
public class EnviromentControllerTest
public class EnviromentProviderTest
{
[Test]

View file

@ -72,11 +72,11 @@
<Compile Include="AutoMoq\AutoMoqerTest.cs" />
<Compile Include="AutoMoq\Unity\AutoMockingBuilderStrategy.cs" />
<Compile Include="AutoMoq\Unity\AutoMockingContainerExtension.cs" />
<Compile Include="ApplicationTest.cs" />
<Compile Include="MonitoringProviderTest.cs" />
<Compile Include="ConfigProviderTest.cs" />
<Compile Include="IISProviderTest.cs" />
<Compile Include="ProcessProviderTests.cs" />
<Compile Include="EnviromentControllerTest.cs" />
<Compile Include="EnviromentProviderTest.cs" />
<Compile Include="ServiceControllerTests.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>

View file

@ -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()
{