Fix UpdateFixture artist path test

pull/2864/head
Qstick 2 years ago
parent 02152d85a1
commit 80143e0ae1

@ -16,6 +16,7 @@ namespace NzbDrone.Core.Test.NotificationTests.Xbmc
private const string MB_ID = "9f4e41c3-2648-428e-b8c7-dc10465b49ac"; private const string MB_ID = "9f4e41c3-2648-428e-b8c7-dc10465b49ac";
private XbmcSettings _settings; private XbmcSettings _settings;
private List<KodiArtist> _xbmcArtist; private List<KodiArtist> _xbmcArtist;
private List<KodiSource> _xbmcSources;
[SetUp] [SetUp]
public void Setup() public void Setup()
@ -26,15 +27,26 @@ namespace NzbDrone.Core.Test.NotificationTests.Xbmc
_xbmcArtist = Builder<KodiArtist>.CreateListOfSize(3) _xbmcArtist = Builder<KodiArtist>.CreateListOfSize(3)
.TheFirst(1) .TheFirst(1)
.With(s => s.MusicbrainzArtistId = new List<string> { MB_ID.ToString() }) .With(s => s.MusicbrainzArtistId = new List<string> { MB_ID.ToString() })
.With(s => s.SourceId = new List<int> { 1 })
.TheNext(2) .TheNext(2)
.With(s => s.MusicbrainzArtistId = new List<string>()) .With(s => s.MusicbrainzArtistId = new List<string>())
.Build() .Build()
.ToList(); .ToList();
_xbmcSources = Builder<KodiSource>.CreateListOfSize(1)
.All()
.With(s => s.SourceId = _xbmcArtist.First().SourceId.First())
.Build()
.ToList();
Mocker.GetMock<IXbmcJsonApiProxy>() Mocker.GetMock<IXbmcJsonApiProxy>()
.Setup(s => s.GetArtist(_settings)) .Setup(s => s.GetArtist(_settings))
.Returns(_xbmcArtist); .Returns(_xbmcArtist);
Mocker.GetMock<IXbmcJsonApiProxy>()
.Setup(s => s.GetSources(_settings))
.Returns(_xbmcSources);
Mocker.GetMock<IXbmcJsonApiProxy>() Mocker.GetMock<IXbmcJsonApiProxy>()
.Setup(s => s.GetActivePlayers(_settings)) .Setup(s => s.GetActivePlayers(_settings))
.Returns(new List<ActivePlayer>()); .Returns(new List<ActivePlayer>());

Loading…
Cancel
Save