pull/2725/head
Bogdan 2 years ago
parent 84d47b1f23
commit b79941e0a1

@ -42,7 +42,7 @@ namespace NzbDrone.Core.Test.MetadataSource.Goodreads
[TestCase("Robert Harris", "Robert Harris")] [TestCase("Robert Harris", "Robert Harris")]
[TestCase("James Patterson", "James Patterson")] [TestCase("James Patterson", "James Patterson")]
[TestCase("Antoine de Saint-Exupéry", "Antoine de Saint-Exupéry")] [TestCase("Elisa Puricelli Guerra", "Elisa Puricelli Guerra")]
public void successful_author_search(string title, string expected) public void successful_author_search(string title, string expected)
{ {
var result = Subject.SearchForNewAuthor(title); var result = Subject.SearchForNewAuthor(title);
@ -85,8 +85,8 @@ namespace NzbDrone.Core.Test.MetadataSource.Goodreads
ExceptionVerification.IgnoreWarns(); ExceptionVerification.IgnoreWarns();
} }
[TestCase("Philip Pullman", 0, typeof(Author), new[] { "Philip Pullman" }, TestName = "author")] [TestCase("Catherine Butler", 0, typeof(Author), new[] { "Catherine Butler" }, TestName = "author")]
[TestCase("Philip Pullman", 1, typeof(Book), new[] { "Northern Lights", "The Amber Spyglass" }, TestName = "book")] [TestCase("Catherine Butler", 1, typeof(Book), new[] { "Shattered Dreams", "Shattered Dreams" }, TestName = "book")]
public void successful_combined_search(string query, int position, Type resultType, string[] expected) public void successful_combined_search(string query, int position, Type resultType, string[] expected)
{ {
var result = Subject.SearchForNewEntity(query); var result = Subject.SearchForNewEntity(query);
@ -97,7 +97,7 @@ namespace NzbDrone.Core.Test.MetadataSource.Goodreads
{ {
var cast = result[position] as Author; var cast = result[position] as Author;
cast.Should().NotBeNull(); cast.Should().NotBeNull();
cast.Name.Should().ContainAll(expected); cast.Name.Should().ContainAny(expected);
} }
else else
{ {

@ -26,7 +26,7 @@ namespace NzbDrone.Core.Test.MetadataSource.Goodreads
[TestCase("Robert Harris", 575)] [TestCase("Robert Harris", 575)]
[TestCase("James Patterson", 3780)] [TestCase("James Patterson", 3780)]
[TestCase("Antoine de Saint-Exupéry", 1020792)] [TestCase("Elisa Puricelli Guerra", 4481805)]
public void successful_author_search(string title, int expected) public void successful_author_search(string title, int expected)
{ {
var result = Subject.Search(title); var result = Subject.Search(title);
@ -38,7 +38,7 @@ namespace NzbDrone.Core.Test.MetadataSource.Goodreads
ExceptionVerification.IgnoreWarns(); ExceptionVerification.IgnoreWarns();
} }
[TestCase("Harry Potter and the sorcerer's stone", 3)] [TestCase("Harry Potter and the sorcerer's stone", 61209488)]
[TestCase("B0192CTMYG", 61209488)] [TestCase("B0192CTMYG", 61209488)]
[TestCase("9780439554930", 48517161)] [TestCase("9780439554930", 48517161)]
public void successful_book_search(string title, int expected) public void successful_book_search(string title, int expected)

Loading…
Cancel
Save