use of com.enonic.xp.content.ResolvePublishDependenciesParams in project xp by enonic.
the class ContentServiceImplTest_resolvePublishDependencies method resolve_children_in_the_middle_excluded.
@Disabled("This test is not correct; it should not be allowed to exclude parent if new")
@Test
public void resolve_children_in_the_middle_excluded() throws Exception {
final ResolvePublishDependenciesParams.Builder builder = getPushParamsWithDependenciesBuilder();
final Content child3 = this.contentService.create(CreateContentParams.create().contentData(new PropertyTree()).displayName("This is my child 3").parent(child1.getPath()).type(ContentTypeName.folder()).build());
refresh();
final ResolvePublishDependenciesParams pushParams = builder.contentIds(ContentIds.from(content1.getId(), content2.getId())).excludedContentIds(ContentIds.from(child1.getId())).build();
final CompareContentResults result = this.contentService.resolvePublishDependencies(pushParams);
assertEquals(4, result.contentIds().getSize());
assertFalse(result.contentIds().contains(child1.getId()));
assertTrue(result.contentIds().contains(child3.getId()));
}
Aggregations