Example usage for com.liferay.portal.kernel.theme ThemeDisplay setScopeGroupId

List of usage examples for com.liferay.portal.kernel.theme ThemeDisplay setScopeGroupId

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.theme ThemeDisplay setScopeGroupId.

Prototype

public void setScopeGroupId(long scopeGroupId) 

Source Link

Usage

From source file:com.liferay.site.service.persistence.test.GroupServiceTest.java

License:Open Source License

@Test
public void testGroupIsParentSiteScopeLabel() throws Exception {
    ThemeDisplay themeDisplay = new ThemeDisplay();

    Group group = GroupTestUtil.addGroup();

    Group subgroup = GroupTestUtil.addGroup(group.getGroupId());

    themeDisplay.setScopeGroupId(subgroup.getGroupId());

    String scopeLabel = group.getScopeLabel(themeDisplay);

    Assert.assertEquals("parent-site", scopeLabel);

    GroupLocalServiceUtil.deleteGroup(subgroup);

    GroupLocalServiceUtil.deleteGroup(group);
}

From source file:com.liferay.site.service.persistence.test.GroupServiceTest.java

License:Open Source License

@Test
public void testGroupIsSiteScopeLabel() throws Exception {
    ThemeDisplay themeDisplay = new ThemeDisplay();

    Group group = GroupTestUtil.addGroup();

    themeDisplay.setScopeGroupId(_group.getGroupId());

    String scopeLabel = group.getScopeLabel(themeDisplay);

    Assert.assertEquals("site", scopeLabel);

    GroupLocalServiceUtil.deleteGroup(group);
}