Search in sources :

Example 1 with CreateSiteParams

use of com.enonic.xp.site.CreateSiteParams in project xp by enonic.

the class ContentServiceImplTest_create method create_site.

@Test
public void create_site() throws Exception {
    final CreateSiteParams createSiteParams = new CreateSiteParams();
    createSiteParams.parent(ContentPath.ROOT).displayName("My site").description("This is my site").siteConfigs(SiteConfigs.empty());
    final Content content = this.contentService.create(createSiteParams);
    assertNotNull(content.getName());
    assertNotNull(content.getCreatedTime());
    assertNotNull(content.getCreator());
    assertNotNull(content.getModifiedTime());
    assertNotNull(content.getModifier());
}
Also used : Content(com.enonic.xp.content.Content) CreateSiteParams(com.enonic.xp.site.CreateSiteParams) Test(org.junit.jupiter.api.Test)

Example 2 with CreateSiteParams

use of com.enonic.xp.site.CreateSiteParams in project xp by enonic.

the class ContentServiceImplTest_getNearestSite method createSite.

private Content createSite() {
    final CreateSiteParams createSiteParams = new CreateSiteParams();
    createSiteParams.parent(ContentPath.ROOT).displayName("My mock site").description("This is my mock site").siteConfigs(SiteConfigs.empty());
    return this.contentService.create(createSiteParams);
}
Also used : CreateSiteParams(com.enonic.xp.site.CreateSiteParams)

Aggregations

CreateSiteParams (com.enonic.xp.site.CreateSiteParams)2 Content (com.enonic.xp.content.Content)1 Test (org.junit.jupiter.api.Test)1