parent
1e0e8adc77
commit
acb6fc01b3
@ -0,0 +1,41 @@
|
||||
using System.Collections.Generic;
|
||||
using FluentAssertions;
|
||||
using Moq;
|
||||
using NUnit.Framework;
|
||||
using NzbDrone.Core.MediaFiles.BookImport.Identification;
|
||||
using NzbDrone.Core.MetadataSource;
|
||||
using NzbDrone.Core.MetadataSource.Goodreads;
|
||||
using NzbDrone.Core.Parser.Model;
|
||||
using NzbDrone.Core.Test.Framework;
|
||||
|
||||
namespace NzbDrone.Core.Test.MediaFiles.BookImport.Identification
|
||||
{
|
||||
[TestFixture]
|
||||
public class CandidateServiceFixture : CoreTest<CandidateService>
|
||||
{
|
||||
[Test]
|
||||
public void should_not_throw_on_goodreads_exception()
|
||||
{
|
||||
Mocker.GetMock<ISearchForNewBook>()
|
||||
.Setup(s => s.SearchForNewBook(It.IsAny<string>(), It.IsAny<string>()))
|
||||
.Throws(new GoodreadsException("Bad search"));
|
||||
|
||||
var edition = new LocalEdition
|
||||
{
|
||||
LocalBooks = new List<LocalBook>
|
||||
{
|
||||
new LocalBook
|
||||
{
|
||||
FileTrackInfo = new ParsedTrackInfo
|
||||
{
|
||||
AuthorTitle = "Author",
|
||||
BookTitle = "Book"
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Subject.GetRemoteCandidates(edition).Should().BeEmpty();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in new issue