use of com.enonic.xp.content.PublishContentResult in project xp by enonic.
the class ContentServiceImplTest_publish method push_deleted.
@Test
public void push_deleted() throws Exception {
final Content content = this.contentService.create(CreateContentParams.create().contentData(new PropertyTree()).displayName("This is my content").parent(ContentPath.ROOT).type(ContentTypeName.folder()).build());
final PushContentParams pushParams = PushContentParams.create().contentIds(ContentIds.from(content.getId())).target(WS_OTHER).build();
final PublishContentResult push = this.contentService.publish(pushParams);
assertEquals(1, push.getPushedContents().getSize());
contentService.deleteWithoutFetch(DeleteContentParams.create().contentPath(content.getPath()).build());
final PublishContentResult pushWithDeleted = this.contentService.publish(pushParams);
assertEquals(1, pushWithDeleted.getDeletedContents().getSize());
}
Aggregations