Files
Readarr/src/NzbDrone.Integration.Test/ApiTests/AuthorLookupFixture.cs
T
2023-07-29 09:04:22 +03:00

29 lines
812 B
C#

using FluentAssertions;
using NUnit.Framework;
namespace NzbDrone.Integration.Test.ApiTests
{
[TestFixture]
public class AuthorLookupFixture : IntegrationTest
{
[TestCase("Robert Harris", "Robert Harris")]
[TestCase("Philip W. Errington", "Philip W. Errington")]
public void lookup_new_author_by_name(string term, string name)
{
var author = Author.Lookup(term);
author.Should().NotBeEmpty();
author.Should().Contain(c => c.AuthorName == name);
}
[Test]
public void lookup_new_author_by_goodreads_book_id()
{
var author = Author.Lookup("edition:1");
author.Should().NotBeEmpty();
author.Should().Contain(c => c.AuthorName == "J.K. Rowling");
}
}
}