Search in sources :

Example 26 with VaadinSession

use of com.vaadin.flow.server.VaadinSession in project flow by vaadin.

the class ElementTest method createUI.

@SuppressWarnings("serial")
private UI createUI() {
    VaadinSession session = new VaadinSession(EasyMock.createMock(VaadinService.class)) {

        @Override
        public boolean hasLock() {
            return true;
        }
    };
    UI ui = new UI() {

        @Override
        public VaadinSession getSession() {
            return session;
        }
    };
    return ui;
}
Also used : VaadinSession(com.vaadin.flow.server.VaadinSession) UI(com.vaadin.flow.component.UI) VaadinService(com.vaadin.flow.server.VaadinService)

Aggregations

VaadinSession (com.vaadin.flow.server.VaadinSession)26 UI (com.vaadin.flow.component.UI)9 VaadinService (com.vaadin.flow.server.VaadinService)9 Before (org.junit.Before)6 DefaultInstantiator (com.vaadin.flow.di.DefaultInstantiator)4 VaadinServletRequest (com.vaadin.flow.server.VaadinServletRequest)4 SpringVaadinSession (com.vaadin.flow.spring.SpringVaadinSession)4 Test (org.junit.Test)4 CurrentInstance (com.vaadin.flow.internal.CurrentInstance)3 DeploymentConfiguration (com.vaadin.flow.function.DeploymentConfiguration)2 SessionExpiredException (com.vaadin.flow.server.SessionExpiredException)2 SystemMessages (com.vaadin.flow.server.SystemMessages)2 VaadinServlet (com.vaadin.flow.server.VaadinServlet)2 VaadinServletService (com.vaadin.flow.server.VaadinServletService)2 InvalidUIDLSecurityKeyException (com.vaadin.flow.server.communication.ServerRpcHandler.InvalidUIDLSecurityKeyException)2 PushMode (com.vaadin.flow.shared.communication.PushMode)2 JsonException (elemental.json.JsonException)2 IOException (java.io.IOException)2 Serializable (java.io.Serializable)2 Field (java.lang.reflect.Field)2