1
0
Fork 0
mirror of https://github.com/Radarr/Radarr synced 2024-12-27 10:19:41 +00:00
Radarr/NzbDrone.Integration.Test/IntegrationTest.cs
2013-08-13 20:22:28 -07:00

61 lines
1.6 KiB
C#

using System;
using System.ComponentModel;
using System.Diagnostics;
using System.IO;
using System.Threading;
using NUnit.Framework;
using NzbDrone.Api.Commands;
using NzbDrone.Api.RootFolders;
using NzbDrone.Common.EnvironmentInfo;
using NzbDrone.Integration.Test.Client;
using NzbDrone.Test.Common.Categories;
using RestSharp;
namespace NzbDrone.Integration.Test
{
[TestFixture]
[IntegrationTest]
public abstract class IntegrationTest
{
protected RestClient RestClient { get; private set; }
protected SeriesClient Series;
protected ClientBase<RootFolderResource> RootFolders;
protected ClientBase<CommandResource> Commands;
protected ReleaseClient Releases;
protected IndexerClient Indexers;
private NzbDroneRunner _runner;
[SetUp]
public void SmokeTestSetup()
{
new StartupArguments();
_runner = new NzbDroneRunner();
_runner.KillAll();
InitRestClients();
_runner.Start();
}
private void InitRestClients()
{
RestClient = new RestClient("http://localhost:8989/api");
Series = new SeriesClient(RestClient);
Releases = new ReleaseClient(RestClient);
RootFolders = new ClientBase<RootFolderResource>(RestClient);
Commands = new ClientBase<CommandResource>(RestClient);
Indexers = new IndexerClient(RestClient);
}
[TearDown]
public void SmokeTestTearDown()
{
_runner.KillAll();
}
}
}