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