Combine verify calls

Co-authored-by: Claus Vium <cvium@users.noreply.github.com>
pull/7039/head
Joe Rogers 3 years ago committed by Joe Rogers
parent b03f56c3d6
commit 6bf71c0fd3
No known key found for this signature in database
GPG Key ID: 0074AD57B8FDBBB4

@ -87,14 +87,8 @@ namespace Jellyfin.Providers.Tests.Manager
Assert.Equal(ItemUpdateType.MetadataDownload, actual.Result);
for (var i = 0; i < servicesList.Length; i++)
{
if (i == expectedIndex)
{
servicesList[i].Verify(mock => mock.RefreshMetadata(It.IsAny<BaseItem>(), It.IsAny<MetadataRefreshOptions>(), It.IsAny<CancellationToken>()), Times.Once());
}
else
{
servicesList[i].Verify(mock => mock.RefreshMetadata(It.IsAny<BaseItem>(), It.IsAny<MetadataRefreshOptions>(), It.IsAny<CancellationToken>()), Times.Never());
}
var times = i == expectedIndex ? Times.Once() : Times.Never();
servicesList[i].Verify(mock => mock.RefreshMetadata(It.IsAny<BaseItem>(), It.IsAny<MetadataRefreshOptions>(), It.IsAny<CancellationToken>()), times);
}
}

Loading…
Cancel
Save