Cleaned up IndexerService and tests

This commit is contained in:
Mark McDowall 2013-02-21 08:38:31 -08:00
parent 5b50aa5d59
commit 563db453fc
6 changed files with 34 additions and 51 deletions

View file

@ -20,17 +20,13 @@ namespace NzbDrone.Core.Test.Indexers
{
[TestFixture]
// ReSharper disable InconsistentNaming
public class IndexerServiceTest : CoreTest
public class IndexerServiceTest : CoreTest<IndexerService>
{
[Test]
public void Init_indexer_test()
{
Mocker.SetConstant<IEnumerable<IndexerBase>>(new List<IndexerBase> { Mocker.Resolve<MockIndexer>() });
//Mocker.GetMock<IIndexerRepository>()
// .Setup(s => s.Find(typeof(MockIndexer)))
// .Returns()
Mocker.Resolve<IndexerService>();
Mocker.GetMock<IIndexerRepository>()
@ -46,7 +42,7 @@ namespace NzbDrone.Core.Test.Indexers
.Setup(s => s.All())
.Returns(new List<Indexer> {new Indexer {OID = 1, Type = "", Enable = false, Name = "Fake Indexer"}});
Mocker.Resolve<IndexerService>().GetEnabledIndexers().Should().BeEmpty();
Subject.GetEnabledIndexers().Should().BeEmpty();
}
[Test]