Unit-test published content linked-list children

This commit is contained in:
Stephan
2019-05-29 16:48:20 +02:00
parent c451498975
commit 983144c3f9
5 changed files with 554 additions and 14 deletions

View File

@@ -36,5 +36,14 @@ namespace Umbraco.Web.PublishedCache.NuCache
Node.SetContentTypeAndData(contentType, draftData, publishedData, publishedSnapshotAccessor, variationContextAccessor);
}
public ContentNodeKit Clone()
=> new ContentNodeKit
{
ContentTypeId = ContentTypeId,
DraftData = DraftData,
PublishedData = PublishedData,
Node = new ContentNode(Node)
};
}
}

View File

@@ -9,13 +9,13 @@ namespace Umbraco.Web.PublishedCache.NuCache.DataSource
internal interface IDataSource
{
ContentNodeKit GetContentSource(IScope scope, int id);
IEnumerable<ContentNodeKit> GetAllContentSources(IScope scope);
IEnumerable<ContentNodeKit> GetBranchContentSources(IScope scope, int id);
IEnumerable<ContentNodeKit> GetAllContentSources(IScope scope); // must order by level
IEnumerable<ContentNodeKit> GetBranchContentSources(IScope scope, int id); // must order by level, sortOrder
IEnumerable<ContentNodeKit> GetTypeContentSources(IScope scope, IEnumerable<int> ids);
ContentNodeKit GetMediaSource(IScope scope, int id);
IEnumerable<ContentNodeKit> GetAllMediaSources(IScope scope);
IEnumerable<ContentNodeKit> GetBranchMediaSources(IScope scope, int id);
IEnumerable<ContentNodeKit> GetAllMediaSources(IScope scope); // must order by level
IEnumerable<ContentNodeKit> GetBranchMediaSources(IScope scope, int id); // must order by level, sortOrder
IEnumerable<ContentNodeKit> GetTypeMediaSources(IScope scope, IEnumerable<int> ids);
}
}
}