mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-25 22:36:59 -04:00
Cleanup Conflicts in Sonarr/Lidarr Pulls
Co-Authored-By: Robin Dadswell <19610103+RobinDadswell@users.noreply.github.com>
This commit is contained in:
@@ -12,21 +12,21 @@ using NzbDrone.Core.Test.Framework;
|
||||
namespace NzbDrone.Core.Test.IndexerSearchTests
|
||||
{
|
||||
[TestFixture]
|
||||
public class ArtistSearchServiceFixture : CoreTest<AuthorSearchService>
|
||||
public class AuthorSearchServiceFixture : CoreTest<AuthorSearchService>
|
||||
{
|
||||
private Author _artist;
|
||||
private Author _author;
|
||||
|
||||
[SetUp]
|
||||
public void Setup()
|
||||
{
|
||||
_artist = new Author();
|
||||
_author = new Author();
|
||||
|
||||
Mocker.GetMock<IAuthorService>()
|
||||
.Setup(s => s.GetAuthor(It.IsAny<int>()))
|
||||
.Returns(_artist);
|
||||
.Returns(_author);
|
||||
|
||||
Mocker.GetMock<ISearchForNzb>()
|
||||
.Setup(s => s.AuthorSearch(_artist.Id, false, true, false))
|
||||
.Setup(s => s.AuthorSearch(_author.Id, false, true, false))
|
||||
.Returns(new List<DownloadDecision>());
|
||||
|
||||
Mocker.GetMock<IProcessDownloadDecisions>()
|
||||
@@ -35,19 +35,19 @@ namespace NzbDrone.Core.Test.IndexerSearchTests
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_only_include_monitored_albums()
|
||||
public void should_only_include_monitored_books()
|
||||
{
|
||||
_artist.Books = new List<Book>
|
||||
_author.Books = new List<Book>
|
||||
{
|
||||
new Book { Monitored = false },
|
||||
new Book { Monitored = true }
|
||||
};
|
||||
|
||||
Subject.Execute(new AuthorSearchCommand { AuthorId = _artist.Id, Trigger = CommandTrigger.Manual });
|
||||
Subject.Execute(new AuthorSearchCommand { AuthorId = _author.Id, Trigger = CommandTrigger.Manual });
|
||||
|
||||
Mocker.GetMock<ISearchForNzb>()
|
||||
.Verify(v => v.AuthorSearch(_artist.Id, false, true, false),
|
||||
Times.Exactly(_artist.Books.Value.Count(s => s.Monitored)));
|
||||
.Verify(v => v.AuthorSearch(_author.Id, false, true, false),
|
||||
Times.Exactly(_author.Books.Value.Count(s => s.Monitored)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,13 +6,13 @@ using NzbDrone.Core.Test.Framework;
|
||||
|
||||
namespace NzbDrone.Core.Test.IndexerSearchTests
|
||||
{
|
||||
public class AlbumSearchDefinitionFixture : CoreTest<BookSearchCriteria>
|
||||
public class BookSearchDefinitionFixture : CoreTest<BookSearchCriteria>
|
||||
{
|
||||
[TestCase("Mötley Crüe", "Motley+Crue")]
|
||||
[TestCase("방탄소년단", "방탄소년단")]
|
||||
public void should_replace_some_special_characters_artist(string artist, string expected)
|
||||
public void should_replace_some_special_characters_author(string author, string expected)
|
||||
{
|
||||
Subject.Author = new Author { Name = artist };
|
||||
Subject.Author = new Author { Name = author };
|
||||
Subject.AuthorQuery.Should().Be(expected);
|
||||
}
|
||||
|
||||
@@ -22,16 +22,16 @@ namespace NzbDrone.Core.Test.IndexerSearchTests
|
||||
[TestCase("¿Quién sabe?", "Quien+sabe")]
|
||||
[TestCase("Seal the Deal & Let’s Boogie", "Seal+the+Deal+Let’s+Boogie")]
|
||||
[TestCase("Section.80", "Section+80")]
|
||||
public void should_replace_some_special_characters(string album, string expected)
|
||||
public void should_replace_some_special_characters(string book, string expected)
|
||||
{
|
||||
Subject.BookTitle = album;
|
||||
Subject.BookTitle = book;
|
||||
Subject.BookQuery.Should().Be(expected);
|
||||
}
|
||||
|
||||
[TestCase("+", "+")]
|
||||
public void should_not_replace_some_special_characters_if_result_empty_string(string album, string expected)
|
||||
public void should_not_replace_some_special_characters_if_result_empty_string(string book, string expected)
|
||||
{
|
||||
Subject.BookTitle = album;
|
||||
Subject.BookTitle = book;
|
||||
Subject.BookQuery.Should().Be(expected);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user