Example usage for com.liferay.portal.kernel.test.util UserTestUtil addCompanyAdminUser

List of usage examples for com.liferay.portal.kernel.test.util UserTestUtil addCompanyAdminUser

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.test.util UserTestUtil addCompanyAdminUser.

Prototype

public static User addCompanyAdminUser(Company company) throws Exception 

Source Link

Usage

From source file:com.liferay.adaptive.media.document.library.thumbnails.internal.commands.test.AdaptiveMediaThumbnailsOSGiCommandsTest.java

License:Open Source License

@Before
public void setUp() throws Exception {
    ServiceTestUtil.setUser(TestPropsValues.getUser());

    _company = CompanyTestUtil.addCompany();

    _user = UserTestUtil.addCompanyAdminUser(_company);

    _group = GroupTestUtil.addGroup(_company.getCompanyId(), _user.getUserId(),
            GroupConstants.DEFAULT_PARENT_GROUP_ID);

    _addConfiguration(100, 100);//w  w w  .ja v a2s  .co m
    _addConfiguration(300, 300);

    _serviceContext = ServiceContextTestUtil.getServiceContext(_group, _user.getUserId());

    ServiceContextThreadLocal.pushServiceContext(_serviceContext);
}