Windows service is half working,

This commit is contained in:
Keivan Beigi 2011-10-12 19:24:30 -07:00
commit 6b7923bd52
12 changed files with 92 additions and 23 deletions

View file

@ -1,12 +1,6 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using FluentAssertions;
using FluentAssertions;
using NUnit.Framework;
using Ninject;
using NzbDrone.Providers;
namespace NzbDrone.App.Test
{
@ -36,5 +30,14 @@ namespace NzbDrone.App.Test
appServer.Should().NotBeNull();
}
[Test]
public void Kernel_should_resolve_same_ApplicationServer_instance()
{
var appServer1 = CentralDispatch.Kernel.Get<ApplicationServer>();
var appServer2 = CentralDispatch.Kernel.Get<ApplicationServer>();
appServer1.Should().BeSameAs(appServer2);
}
}
}

View file

@ -50,7 +50,9 @@
<Reference Include="Moq">
<HintPath>..\packages\Moq.4.0.10827\lib\NET40\Moq.dll</HintPath>
</Reference>
<Reference Include="Ninject, Version=2.2.0.0, Culture=neutral, PublicKeyToken=c7192dc5380945e7, processorArchitecture=MSIL" />
<Reference Include="Ninject">
<HintPath>..\packages\Ninject.2.2.1.4\lib\net40-Full\Ninject.dll</HintPath>
</Reference>
<Reference Include="nunit.framework">
<HintPath>..\packages\NUnit.2.5.10.11092\lib\nunit.framework.dll</HintPath>
</Reference>

View file

@ -46,5 +46,16 @@ namespace NzbDrone.App.Test
serviceController.UnInstall();
serviceController.ServiceExist(ServiceProvider.NzbDroneServiceName).Should().BeFalse();
}
[Test]
[Explicit]
public void UnInstallService()
{
var serviceController = new ServiceProvider();
//Act
serviceController.UnInstall();
serviceController.ServiceExist(ServiceProvider.NzbDroneServiceName).Should().BeFalse();
}
}
}

View file

@ -4,6 +4,7 @@
<package id="FluentAssertions" version="1.5.0.0" />
<package id="Moq" version="4.0.10827" />
<package id="NBuilder" version="3.0.1" />
<package id="Ninject" version="2.2.1.4" />
<package id="NUnit" version="2.5.10.11092" />
<package id="Unity" version="2.1.505.0" />
</packages>