ensures all GetPagedDescendant methods are mocked - fixes tests.

This commit is contained in:
Shannon
2016-04-13 15:47:21 +02:00
parent dbff25bd6d
commit c3b4a9128a

View File

@@ -49,7 +49,8 @@ namespace Umbraco.Tests.UmbracoExamine
}
if (mediaService == null)
{
long totalRecs;
long longTotalRecs;
int intTotalRecs;
var allRecs = dataService.MediaService.GetLatestMediaByXpath("//node")
.Root
@@ -74,7 +75,15 @@ namespace Umbraco.Tests.UmbracoExamine
mediaService = Mock.Of<IMediaService>(
x => x.GetPagedDescendants(
It.IsAny<int>(), It.IsAny<long>(), It.IsAny<int>(), out totalRecs, It.IsAny<string>(), It.IsAny<Direction>(), It.IsAny<bool>(), It.IsAny<string>())
It.IsAny<int>(), It.IsAny<long>(), It.IsAny<int>(), out longTotalRecs, It.IsAny<string>(), It.IsAny<Direction>(), It.IsAny<bool>(), It.IsAny<string>())
==
allRecs
&& x.GetPagedDescendants(
It.IsAny<int>(), It.IsAny<long>(), It.IsAny<int>(), out longTotalRecs, It.IsAny<string>(), It.IsAny<Direction>(), It.IsAny<string>())
==
allRecs
&& x.GetPagedDescendants(
It.IsAny<int>(), It.IsAny<int>(), It.IsAny<int>(), out intTotalRecs, It.IsAny<string>(), It.IsAny<Direction>(), It.IsAny<string>())
==
allRecs);