Example usage for com.liferay.portal.kernel.util Portal getCompany

List of usage examples for com.liferay.portal.kernel.util Portal getCompany

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.util Portal getCompany.

Prototype

public Company getCompany(PortletRequest portletRequest) throws PortalException;

Source Link

Usage

From source file:com.liferay.dynamic.data.mapping.form.evaluator.impl.internal.DDMFormEvaluatorHelperTest.java

License:Open Source License

protected void setPortalUtil() throws Exception {
    PortalUtil portalUtil = new PortalUtil();

    Portal portal = mock(Portal.class);

    when(portal.getUser(_request)).thenReturn(_user);
    when(portal.getCompany(_request)).thenReturn(_company);

    portalUtil.setPortal(portal);// w ww  .ja  v a  2  s. c  om
}

From source file:com.liferay.dynamic.data.mapping.form.evaluator.internal.DDMFormEvaluatorHelperTest.java

License:Open Source License

protected void setUpPortalUtil() throws Exception {
    PortalUtil portalUtil = new PortalUtil();

    Portal portal = Mockito.mock(Portal.class);

    Mockito.when(portal.getUser(_request)).thenReturn(_user);

    Mockito.when(portal.getCompany(_request)).thenReturn(_company);

    portalUtil.setPortal(portal);/*from   ww  w . j  a v a 2  s  .  c  o  m*/
}

From source file:com.liferay.dynamic.data.mapping.form.evaluator.internal.functions.BelongsToRoleFunctionTest.java

License:Open Source License

protected void setPortalUtil() throws Exception {
    PortalUtil portalUtil = new PortalUtil();

    Portal portal = Mockito.mock(Portal.class);

    Mockito.when(portal.getUser(_request)).thenReturn(_user);

    Mockito.when(portal.getCompany(_request)).thenReturn(_company);

    portalUtil.setPortal(portal);// www. j a v a2 s. c  o m
}