All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.mvysny.kaributesting.v10.groovy.MockVaadinExtensionMethods.groovy Maven / Gradle / Ivy

There is a newer version: 2.2.0
Show newest version
package com.github.mvysny.kaributesting.v10.groovy

import com.github.mvysny.fakeservlet.FakeHttpSession
import com.github.mvysny.fakeservlet.FakeRequest
import com.github.mvysny.fakeservlet.FakeResponse
import com.github.mvysny.kaributesting.v10.UtilsKt
import com.vaadin.flow.server.VaadinRequest
import com.vaadin.flow.server.VaadinResponse
import com.vaadin.flow.server.VaadinSession
import groovy.transform.CompileStatic
import org.jetbrains.annotations.NotNull

@CompileStatic
class MockVaadinExtensionMethods {
    /**
     * Retrieves the mock request which backs up [VaadinRequest].
     * 
     * currentRequest.mock.addCookie(Cookie("foo", "bar"))
     * 
*/ @NotNull static FakeRequest getMock(@NotNull VaadinRequest self) { UtilsKt.getMock(self) } /** * Retrieves the mock request which backs up [VaadinResponse]. *
     * currentResponse.mock.getCookie("foo").value
     * 
*/ @NotNull static FakeResponse getMock(@NotNull VaadinResponse self) { UtilsKt.getMock(self) } /** * Retrieves the mock session which backs up [VaadinSession]. *
     * VaadinSession.getCurrent().mock
     * 
*/ @NotNull static FakeHttpSession getMock(@NotNull VaadinSession self) { UtilsKt.getMock(self) } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy