Search in sources :

Example 1 with IndexHtmlResponse

use of com.vaadin.flow.server.communication.IndexHtmlResponse in project flow by vaadin.

the class CsrfIndexHtmlRequestListenerTest method setup.

@Before
public void setup() {
    csrfIndexHtmlRequestListener = Mockito.spy(new CsrfIndexHtmlRequestListener());
    vaadinRequest = Mockito.mock(VaadinRequest.class);
    Mockito.doReturn(TEST_CONTEXT_PATH).when(vaadinRequest).getContextPath();
    Mockito.doReturn(true).when(vaadinRequest).isSecure();
    VaadinResponse vaadinResponse = Mockito.mock(VaadinResponse.class);
    Document document = Mockito.mock(Document.class);
    indexHtmlResponse = new IndexHtmlResponse(vaadinRequest, vaadinResponse, document);
}
Also used : VaadinResponse(com.vaadin.flow.server.VaadinResponse) IndexHtmlResponse(com.vaadin.flow.server.communication.IndexHtmlResponse) VaadinRequest(com.vaadin.flow.server.VaadinRequest) Document(org.jsoup.nodes.Document) Before(org.junit.Before)

Aggregations

VaadinRequest (com.vaadin.flow.server.VaadinRequest)1 VaadinResponse (com.vaadin.flow.server.VaadinResponse)1 IndexHtmlResponse (com.vaadin.flow.server.communication.IndexHtmlResponse)1 Document (org.jsoup.nodes.Document)1 Before (org.junit.Before)1