fixed server side indexer issue

This commit is contained in:
kay.one 2013-05-02 22:24:52 -07:00
commit 1877f70403
15 changed files with 104 additions and 63 deletions

View file

@ -0,0 +1,16 @@
using NzbDrone.Api.Indexers;
using RestSharp;
namespace NzbDrone.Integration.Test.Client
{
public class IndexerClient : ClientBase<IndexerResource>
{
public IndexerClient(IRestClient restClient)
: base(restClient)
{
}
}
}

View file

@ -0,0 +1,22 @@
using System.IO;
using FluentAssertions;
using NUnit.Framework;
using NzbDrone.Api.RootFolders;
namespace NzbDrone.Integration.Test
{
[TestFixture]
public class IndexerIntegrationFixture : IntegrationTest
{
[Test]
public void should_have_built_in_indexer()
{
var indexers = Indexers.All();
indexers.Should().NotBeEmpty();
indexers.Should().NotContain(c => string.IsNullOrWhiteSpace(c.Name));
}
}
}

View file

@ -7,6 +7,7 @@ using NUnit.Framework;
using Nancy.Hosting.Self;
using NzbDrone.Api;
using NzbDrone.Api.Commands;
using NzbDrone.Api.Indexers;
using NzbDrone.Api.RootFolders;
using NzbDrone.Common;
using NzbDrone.Core.Datastore;
@ -32,6 +33,7 @@ namespace NzbDrone.Integration.Test
protected ClientBase<RootFolderResource> RootFolders;
protected ClientBase<CommandResource> Commands;
protected ReleaseClient Releases;
protected IndexerClient Indexers;
static IntegrationTest()
{
@ -89,6 +91,7 @@ namespace NzbDrone.Integration.Test
Releases = new ReleaseClient(RestClient);
RootFolders = new ClientBase<RootFolderResource>(RestClient);
Commands = new ClientBase<CommandResource>(RestClient);
Indexers = new IndexerClient(RestClient);
_host.Start();
}

View file

@ -68,9 +68,11 @@
</ItemGroup>
<ItemGroup>
<Compile Include="Client\ClientBase.cs" />
<Compile Include="Client\IndexerClient.cs" />
<Compile Include="Client\SeriesClient - Copy.cs" />
<Compile Include="Client\SeriesClient.cs" />
<Compile Include="CommandIntegerationTests.cs" />
<Compile Include="IndexerIntegrationFixture.cs" />
<Compile Include="QualityProfileIntegrationTest.cs" />
<Compile Include="ReleaseIntegrationTest.cs" />
<Compile Include="IntegrationTest.cs" />