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

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

Introduction

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

Prototype

public User getUser(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 w w.j  a  v a  2 s.  co m
}

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   w  w w . j av a  2s  . 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);/*ww w  .j  av a 2 s  . co  m*/
}