mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 05:23:31 -07:00
Fixed unit tests.
This commit is contained in:
parent
da979639ba
commit
ea77428b1c
2 changed files with 20 additions and 19 deletions
|
@ -24,10 +24,10 @@ namespace NzbDrone.Core.Test
|
|||
|
||||
//Setup
|
||||
var list = new List<Indexer>();
|
||||
list.Add(new Indexer{Name = "Test1", RssUrl = "http://www.test1.com/rss.php", Enabled = true, Order = 1});
|
||||
list.Add(new Indexer{Name = "Test2", RssUrl = "http://www.test2.com/rss.php", Enabled = false, Order = 4});
|
||||
list.Add(new Indexer{Name = "Test3", RssUrl = "http://www.test3.com/rss.php", Enabled = true, Order = 3});
|
||||
list.Add(new Indexer{Name = "Test4", RssUrl = "http://www.test4.com/rss.php", Enabled = false, Order = 2});
|
||||
list.Add(new Indexer { IndexerName = "Test1", RssUrl = "http://www.test1.com/rss.php", Enabled = true, Order = 1 });
|
||||
list.Add(new Indexer { IndexerName = "Test2", RssUrl = "http://www.test2.com/rss.php", Enabled = false, Order = 4 });
|
||||
list.Add(new Indexer { IndexerName = "Test3", RssUrl = "http://www.test3.com/rss.php", Enabled = true, Order = 3 });
|
||||
list.Add(new Indexer { IndexerName = "Test4", RssUrl = "http://www.test4.com/rss.php", Enabled = false, Order = 2 });
|
||||
|
||||
var repo = new Mock<IRepository>();
|
||||
repo.Setup(r => r.All<Indexer>()).Returns(list.AsQueryable());
|
||||
|
@ -39,7 +39,7 @@ namespace NzbDrone.Core.Test
|
|||
|
||||
//Assert
|
||||
|
||||
Assert.AreEqual(result.Last().Name, "Test2");
|
||||
Assert.AreEqual(result.Last().IndexerName, "Test2");
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
@ -51,10 +51,10 @@ namespace NzbDrone.Core.Test
|
|||
|
||||
//Setup
|
||||
var list = new List<Indexer>();
|
||||
list.Add(new Indexer { Name = "Test1", RssUrl = "http://www.test1.com/rss.php", Enabled = true, Order = 1 });
|
||||
list.Add(new Indexer { Name = "Test2", RssUrl = "http://www.test2.com/rss.php", Enabled = false, Order = 4 });
|
||||
list.Add(new Indexer { Name = "Test3", RssUrl = "http://www.test3.com/rss.php", Enabled = true, Order = 3 });
|
||||
list.Add(new Indexer { Name = "Test4", RssUrl = "http://www.test4.com/rss.php", Enabled = false, Order = 2 });
|
||||
list.Add(new Indexer { IndexerName = "Test1", RssUrl = "http://www.test1.com/rss.php", Enabled = true, Order = 1 });
|
||||
list.Add(new Indexer { IndexerName = "Test2", RssUrl = "http://www.test2.com/rss.php", Enabled = false, Order = 4 });
|
||||
list.Add(new Indexer { IndexerName = "Test3", RssUrl = "http://www.test3.com/rss.php", Enabled = true, Order = 3 });
|
||||
list.Add(new Indexer { IndexerName = "Test4", RssUrl = "http://www.test4.com/rss.php", Enabled = false, Order = 2 });
|
||||
|
||||
var repo = new Mock<IRepository>();
|
||||
repo.Setup(r => r.All<Indexer>()).Returns(list.AsQueryable());
|
||||
|
@ -65,8 +65,8 @@ namespace NzbDrone.Core.Test
|
|||
var result = target.EnabledIndexers();
|
||||
|
||||
//Assert
|
||||
Assert.AreEqual(result.First().Name, "Test1");
|
||||
Assert.AreEqual(result.Last().Name, "Test3");
|
||||
Assert.AreEqual(result.First().IndexerName, "Test1");
|
||||
Assert.AreEqual(result.Last().IndexerName, "Test3");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue