Search in sources :

Example 1 with ResolvePublishDependenciesParams

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()));
}
Also used : ResolvePublishDependenciesParams(com.enonic.xp.content.ResolvePublishDependenciesParams) Content(com.enonic.xp.content.Content) CompareContentResults(com.enonic.xp.content.CompareContentResults) PropertyTree(com.enonic.xp.data.PropertyTree) Test(org.junit.jupiter.api.Test) Disabled(org.junit.jupiter.api.Disabled)

Aggregations

CompareContentResults (com.enonic.xp.content.CompareContentResults)1 Content (com.enonic.xp.content.Content)1 ResolvePublishDependenciesParams (com.enonic.xp.content.ResolvePublishDependenciesParams)1 PropertyTree (com.enonic.xp.data.PropertyTree)1 Disabled (org.junit.jupiter.api.Disabled)1 Test (org.junit.jupiter.api.Test)1