diff --git a/NzbDrone.Integration.Test/NzbDrone.Integration.Test.csproj b/NzbDrone.Integration.Test/NzbDrone.Integration.Test.csproj index 6a35e4218..f60085898 100644 --- a/NzbDrone.Integration.Test/NzbDrone.Integration.Test.csproj +++ b/NzbDrone.Integration.Test/NzbDrone.Integration.Test.csproj @@ -40,6 +40,9 @@ False ..\packages\FluentValidation.4.0.0.1\lib\Net40\FluentValidation.dll + + ..\packages\Microsoft.AspNet.SignalR.Client.1.1.3\lib\net40\Microsoft.AspNet.SignalR.Client.dll + ..\packages\Microsoft.Owin.1.1.0-beta2\lib\net40\Microsoft.Owin.dll diff --git a/NzbDrone.Integration.Test/RootFolderIntegrationTest.cs b/NzbDrone.Integration.Test/RootFolderIntegrationTest.cs index 8a8d04d7f..d4cc4bc83 100644 --- a/NzbDrone.Integration.Test/RootFolderIntegrationTest.cs +++ b/NzbDrone.Integration.Test/RootFolderIntegrationTest.cs @@ -1,5 +1,8 @@ -using System.IO; +using System.Collections.Generic; +using System.IO; using FluentAssertions; +using Microsoft.AspNet.SignalR.Client; +using Microsoft.AspNet.SignalR.Client.Transports; using NUnit.Framework; using NzbDrone.Api.RootFolders; @@ -8,6 +11,30 @@ namespace NzbDrone.Integration.Test [TestFixture] public class RootFolderIntegrationTest : IntegrationTest { + private Connection _connection; + private List _signalRReceived; + + [SetUp] + public void Setup() + { + _signalRReceived = new List(); + _connection = new Connection("http://localhost:8989/signalr/rootfolder"); + _connection.Start(new LongPollingTransport()).ContinueWith(task => + { + if (task.IsFaulted) + { + Assert.Fail("SignalrConnection failed. {0}", task.Exception.GetBaseException()); + } + }); + + _connection.Received += _connection_Received; + } + + private void _connection_Received(string obj) + { + _signalRReceived.Add(obj); + } + [Test] public void should_have_no_root_folder_initially() { diff --git a/NzbDrone.Integration.Test/packages.config b/NzbDrone.Integration.Test/packages.config index 3f0ac1830..0f08d34ac 100644 --- a/NzbDrone.Integration.Test/packages.config +++ b/NzbDrone.Integration.Test/packages.config @@ -2,6 +2,7 @@ +