|
|
|
@ -111,7 +111,7 @@ namespace NzbDrone.Core.Test.MediaCoverTests
|
|
|
|
|
.Setup(v => v.FileExists(It.IsAny<string>()))
|
|
|
|
|
.Returns(true);
|
|
|
|
|
|
|
|
|
|
Subject.HandleAsync(new ArtistUpdatedEvent(_artist));
|
|
|
|
|
Subject.HandleAsync(new ArtistRefreshCompleteEvent(_artist));
|
|
|
|
|
|
|
|
|
|
Mocker.GetMock<IImageResizer>()
|
|
|
|
|
.Verify(v => v.Resize(It.IsAny<string>(), It.IsAny<string>(), It.IsAny<int>()), Times.Exactly(3));
|
|
|
|
@ -132,7 +132,7 @@ namespace NzbDrone.Core.Test.MediaCoverTests
|
|
|
|
|
.Setup(v => v.FileExists(It.IsAny<string>()))
|
|
|
|
|
.Returns(false);
|
|
|
|
|
|
|
|
|
|
Subject.HandleAsync(new ArtistUpdatedEvent(_artist));
|
|
|
|
|
Subject.HandleAsync(new ArtistRefreshCompleteEvent(_artist));
|
|
|
|
|
|
|
|
|
|
Mocker.GetMock<IImageResizer>()
|
|
|
|
|
.Verify(v => v.Resize(It.IsAny<string>(), It.IsAny<string>(), It.IsAny<int>()), Times.Exactly(3));
|
|
|
|
@ -157,7 +157,7 @@ namespace NzbDrone.Core.Test.MediaCoverTests
|
|
|
|
|
.Setup(v => v.GetFileSize(It.IsAny<string>()))
|
|
|
|
|
.Returns(1000);
|
|
|
|
|
|
|
|
|
|
Subject.HandleAsync(new ArtistUpdatedEvent(_artist));
|
|
|
|
|
Subject.HandleAsync(new ArtistRefreshCompleteEvent(_artist));
|
|
|
|
|
|
|
|
|
|
Mocker.GetMock<IImageResizer>()
|
|
|
|
|
.Verify(v => v.Resize(It.IsAny<string>(), It.IsAny<string>(), It.IsAny<int>()), Times.Never());
|
|
|
|
@ -182,7 +182,7 @@ namespace NzbDrone.Core.Test.MediaCoverTests
|
|
|
|
|
.Setup(v => v.GetFileSize(It.IsAny<string>()))
|
|
|
|
|
.Returns(0);
|
|
|
|
|
|
|
|
|
|
Subject.HandleAsync(new ArtistUpdatedEvent(_artist));
|
|
|
|
|
Subject.HandleAsync(new ArtistRefreshCompleteEvent(_artist));
|
|
|
|
|
|
|
|
|
|
Mocker.GetMock<IImageResizer>()
|
|
|
|
|
.Verify(v => v.Resize(It.IsAny<string>(), It.IsAny<string>(), It.IsAny<int>()), Times.Exactly(3));
|
|
|
|
@ -207,7 +207,7 @@ namespace NzbDrone.Core.Test.MediaCoverTests
|
|
|
|
|
.Setup(v => v.Resize(It.IsAny<string>(), It.IsAny<string>(), It.IsAny<int>()))
|
|
|
|
|
.Throws<ApplicationException>();
|
|
|
|
|
|
|
|
|
|
Subject.HandleAsync(new ArtistUpdatedEvent(_artist));
|
|
|
|
|
Subject.HandleAsync(new ArtistRefreshCompleteEvent(_artist));
|
|
|
|
|
|
|
|
|
|
Mocker.GetMock<IImageResizer>()
|
|
|
|
|
.Verify(v => v.Resize(It.IsAny<string>(), It.IsAny<string>(), It.IsAny<int>()), Times.Exactly(3));
|
|
|
|
|